自动提示短语/句子完成短语、句子、提示

由网友(哥有你模仿不来的气质)分享简介:我在建立一个应用程序,我想有能力为我申请读什么用户输入到文本框的过程中,他们正在进入它,并根据这句话至今$ P $有两件事情psent用户。I'm in the process of building an application and i would like to include the ability for...

我在建立一个应用程序,我想有能力为我申请读什么用户输入到文本框的过程中,他们正在进入它,并根据这句话至今$ P $有两件事情psent用户。

I'm in the process of building an application and i would like to include the ability for my application to read what a user has entered into a text box as they are entering it, and based on the sentence so far present the user with two things.

1)名单,我猜我会用的短语preset的名单,我可以通过搜索来获得这些建议。

1) A list of possible phrases they are typing to allow easy auto complete, I'm guessing i would use a preset list of phrases that i could search through to get these suggestions.

2)最有可能的字的基础上的最后一个字输入的基础上,句子的结构,会在接下来的一句或者干脆列表。

2)A list of the most likely word that will come next in the sentence based on the sentence structure or simply based on the last word typed.

我的问题是,有没有其他任何有这样吗?什么是通过搜索可能是成千上万的字符串找到匹配尽快和尽可能有效的最佳途径?如果字符串存储在SD卡上,或直接在code或某种数据库或XML文件,甚至CVS文件的文本文件?任何想法将是巨大的。

My question is, is there anything else out there like this? And what is the best way to search through possibly thousands of strings to find a match as quickly and effectively as possible? Should the strings be stored in a text file on the sd card or directly in code or in some sort of database or xml file or even cvs file? Any ideas would be great

推荐答案

您可以检查出谷歌抄写员 - 它确实pretty的很多东西,你在说什么。链接曾经是 http://scribe.googlelabs.com 但似乎现在消失了:(。 此外,许多键盘一样swiftkey甚至标准的Andr​​oid键盘配备了基本的下一个字prediction。

You could check out Google Scribe - it does pretty much what you're talking about. The link used to be http://scribe.googlelabs.com but it seems to be gone now :(. Also, many keyboards like swiftkey and even the standard Android keyboard feature basic "next word" prediction.

有关当前单词prediction,您筛选通过很可能是最好的加权字典。那么下一个单词prediction也同样可以做到基于语法(这将需要一些语义结构在你的字典,即哪些词是主体,这是动词有哪些不同形式的动词可以采取如成语,莫代尔等。 )

For current word prediction, a weighted dictionary which you filter through would probably be best. Then next word prediction could be done similarly based on syntax (this would require some semantic structure in your dictionary i.e. which words are subjects, which are verbs what are the different forms a verb can take such as phrasal, modal, etc.)

有关你的研究有些链接:

Some links for your research:

项目:可能性(他们使用的XML比如据我所知) 让我输入(GPL下code可用) Project: Possibility (They use xml for example afaik) Let me type (Code available under GPL)

任何数据库应该工作,可让您连接和快速搜索通过这样的标记数据,难度实际上是建立了 - !非常雄心勃勃的项目,我祝你好运。

Any database should work that allows you to attach and quickly search through such tagged data, the difficulty is actually building it - very ambitious project and I wish you luck!

阅读全文

相关推荐

最新文章