金融文本時間提取

瀏覽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

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