按下按键时查找关键词
我正在寻找文本分析器的 .net 实现。输入每个字符后应进行文本分析。分析器应该能够存储几个关键短语,并在输入其中一个短语时触发一个事件。例如,如果搜索的短语是“Hello world”,则分析器应在键入“d”后立即触发“123Hello world”事件,但如果键入“Helloworld”,则不会触发事件。
I am looking for a .net implementation of a text analyzer. The text analyzing should happen after each character is entered. the analyzer should be able to store several key phrases and fire an event whenever one of the phrases are entered. For example if the searched phrase is "Hello world" the analyzer should fire an event on "123Hello world" immediately after 'd' is typed, but it wont fire an event if "Helloworld" is typed.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
二叉树是你的朋友
如果不够明显 - 尝试所有选项,跟随 keyUp 上的节点,当到达叶子时 - 触发一个事件。
binary trees are your friends
and if it is not obvious enough - make a trie of all your options, follow the nodes on keyUp, when reached a leaf - fire an event.