跟踪文本光标,显示上面的菜单
我想构建预测句子顾问,例如(Onion News)Apple Introduces Revolutionary New ...。句子可能可以通过像马尔可夫链这样的程式化伪随机文本生成算法来生成。
我想象这是 - 在打字时,带有预测句子的菜单框显示在文本光标上方。
- 如何“文本光标轨道”并在其上显示菜单
- 实现马尔可夫链的最简单方法是什么
I want to build predictive sentence advisor, like (Onion News) Apple Introduces Revolutionary New .... Sentences can probably be generated by stylized pseudo-random text generating algorithm like Markov chain.
I imagine this as - while typing, menubox with predictive sentences are displayed above text cursor.
- How to 'text cursor track' and display menu over it
- What is the easiest way to implement Markov chain
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
文本框上的工具提示就足够了吗?它可以即时重新计算。
Would a tool tip on the text box be sufficient? It can be recalculated on the fly.
也许此链接将帮助您跟踪光标。我不确定如何将光标位置转换为屏幕坐标,但如果你这样做,Popup 将帮助您显示 JList 或 JComboBox。
对马尔可夫链一无所知。
Maybe this link will help you to track the cursor. I'm not sure how to convert cursor position to screen coordinates, but if you do it, Popup will help you to display JList or JComboBox.
Don't know anything about Markov chain.