如何使用斯坦福 NLP API 从 NL 查询中检索短语或标记?
我需要从斯坦福解析器返回的短语在我的程序中使用。
I need phrases returned from Stanford parser to use to in my program.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
我需要从斯坦福解析器返回的短语在我的程序中使用。
I need phrases returned from Stanford parser to use to in my program.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(1)
您只想要令牌(单词)吗?如果是这样,您想要类似的东西:
或者您想要解析树中的短语吗?如果是这样,您应该像发行版中的 ParserDemo 一样获取返回的 Tree,并使用其中的短语(子树)(您可以迭代它们:
Do you just want the tokens (words)? If so, you want something like:
Or do you want the phrases in the parse tree? If so, you should get the returned Tree as in ParserDemo in the distribution and use the phrases (subtrees) in it (you can iterate over them: