Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 NLTK 库中搜索了获取日期的方法,但我不知道哪种方法最适合获取日期和它们所属的句子。我知道我应该解析 DATE 名称实体,但我应该使用什么方法?
我只需要日期和它所属的句子。
自从发布这个问题以来,我发现 punkt sentence sentence tokenizer 对于隔离句子非常有用。然后我使用了一个简单的查找方法来查找以“18”、“19”或“20”开头的数字字符串。
谢谢大家的意见。