金融文本时间提取

浏览github发现一个有趣的库,:https://github.com/fighting41love/funNLP在里面发现了一个非常非常有用的库:https://github.com/fighting41love/cocoNLP

>>> from cocoNLP.extractor import extractor

>>> ex = extractor()

>>> text = '急寻特朗普,男孩,于2018年11月27号11时在陕西省安康市汉滨区走失。丢失发型短发,...如有线索,请迅速与警方联系:18100065143,132-6156-2938,[email protected] 和yangyangfuture at gmail dot com'

>>> times = ex.extract_time(text)
>>> print(times)
time {"type": "timestamp", "timestamp": "2018-11-27 11:00:00"}

记录一下。顺便感谢开源大佬!以及:寻人微博:https://weibo.com/xrwbyangyangfuture?is_hot=1

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章