【发布时间】:2019-01-03 04:07:39
【问题描述】:
我有很多简历文本文件。在这方面,有不同的日期格式可用,例如出生日期 - 12-12-1995,经验年 - 2000 年现在 或 1995-2005 或 5 年经验或 1995/2005,加入日期 - 2015 年 3 月 5 日等。从这些数据中,我只想提取多年的经验。 如何在 Python 中使用 NLP 做到这一点?请回答。
我尝试了以下方法:
#This gives me all the dates from documents
import datefinder
data = open("/home/system/Desktop/samplecv/5c22fcad79fcc1.33753024.txt")
str1 = ''.join(str(e) for e in data)
matches = datefinder.find_dates(str1)
for match in matches:
print(match)
【问题讨论】:
-
我从不同的文件中得到了所有的日期。但我想要特定年份的经验日期。 @克劳斯 D.
-
对不起,我没有问你的问题是什么,我问你有什么尝试解决的。在 SO 上,希望您首先尝试解决问题并与我们分享您的过程。
-
我更新了我的帖子@Klaus D.
标签: python machine-learning nlp