cocoNLP
cocoNLP copied to clipboard
A Chinese information extraction tool.
时间只有在明确的时间不会出错,类似于“上周”这种表达就会触发错误 我调试了位于`“cocoNLP\Lib\site-packages\cocoNLP\config\basic\time_nlp”`下的`TimeUnit.py`,先是把arrows降级到0.15.0,然后把`.replace`替换成`.replace``.shift`,之后给getTime方法修改(分别加上s)  最后还是有错误  不知用的是哪一版本的arrows呢
(D:\Programs\python) C:\Users\sunyh>pip install cocoNLP Collecting cocoNLP Using cached https://files.pythonhosted.org/packages/8f/c3/59aaa0fcaf7afb0853f0ce21570452f40048628f6b3cd68423ee3e798d05/cocoNLP-0.0.13.tar.gz Complete output from command python setup.py egg_info: Couldn't find index page for 'arrow' (maybe misspelled?) No local packages or working download...
Bumps [arrow](https://github.com/arrow-py/arrow) from 0.14.3 to 0.15.1. Release notes Sourced from arrow's releases. Version 0.15.1 [FIX] Fixed a bug that caused Arrow to fail when passed a negative timestamp string. [FIX]...
能否提供支持网址、银行卡、微信、QQ等号码的提取,另外针对位置信息能否提供具体位置信息的提取,比如:某某酒店,某某小区等?
代码: from cocoNLP.extractor import extractor ex = extractor() text = '#2018-11-27 11:00:00#' times = ex.extract_time(text) print(times) 输出: {"error": "no time pattern could be extracted."} 。。。。。。。。。。。。。。。。。。。。。。。。。。。。。
我实在anaconda上安装的,windows和linux都试了,均失败 Collecting cocoNLP Downloading https://files.pythonhosted.org/packages/6e/63/c4799852e34cc66a2f81e7604a14839de7a165403c3855d3b4edc191f558/cocoNLP-0.0.10.tar.gz (74kB) 100% |████████████████████████████████| 81kB 19kB/s Complete output from command python setup.py egg_info: Installed /tmp/pip-install-v9kles9o/cocoNLP/.eggs/arrow-0.13.0-py3.7.egg Searching for regex Reading https://pypi.org/simple/regex/ Downloading https://files.pythonhosted.org/packages/16/07/ee3e02770ed456a088b90da7c9b1e9aa227e3c956d37b845cef2aab93764/regex-2018.11.22.tar.gz#sha256=79a6a60ed1ee3b12eb0e828c01d75e3b743af6616d69add6c2fde1d425a4ba3f Best match: regex 2018.11.22...
您好 起初代码只能识别单人名称 我为您的代码添加了多人物识别 如果您需要我可以马上把我的代码发给您😁 当然 您的代码写的真的好棒!
我发现识别身份证的时候有一个问题,就是对身份证最后一位有X的无法识别,这个怎么解决
Refer to this CSDN blog:https://blog.csdn.net/weixin_44912159/article/details/103450238