如何从句子中提取相对时间实体? [英] How to extract relative time entities from a sentence?
问题描述
我需要用一个句子来实时替换相对时间实体。如果当前日期是2014年2月25日,则以下输入产生相应的输出。
输入:
1.谁赢得了气球'或 去年 ?
2.昨天有多少人在交通事故中死亡 ?
输出:
1.谁赢得了气球或 2013 ?
2.有多少人在交通事故中死亡 2014年2月24日 ?
Stanford-nlp可以帮助我,但我不知道如何将它用于C#。请帮我解决这个问题。在此先感谢,非常感谢您的帮助。
I need to replace relative time entity by it's real time from a sentence. If Current date is 25-Feb-2014 then the following input produce corresponding output.
Input:
1. Who won the ballon d'or last year?
2. How many people had died at road accident yesterday?
Output:
1. Who won the ballon d'or 2013?
2. How many people had died at road accident 24-Feb-2014?
Stanford-nlp could help me, but I don't know how to use it into C#. Please help me to solve this. Thanks in advance, your help is greatly appreciated.
推荐答案
唯一的方法是解析查找特定单词的数据。您可以购买一些图书馆来帮助我,这样我就可以在网上搜索。否则,你只需要跟踪你要查找的特定短语列表。
The only way to do it is to parse the data looking for specific words. There may be some libraries that you can buy to help so I would search the internet for those. Otherwise, you'll just have to keep track of a list of specific phrases you look for.
看看谢尔盖·蒂洪使用斯坦福的工作 http://sergeytihon.wordpress.com/2013/07/11/stanford-parser-is-available-on -nuget / [ ^ ]
Have a look at Sergey Tihon's work using Stanford http://sergeytihon.wordpress.com/2013/07/11/stanford-parser-is-available-on-nuget/[^]
这篇关于如何从句子中提取相对时间实体?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!