nlpir-team / nlpir-python Goto Github PK
View Code? Open in Web Editor NEWNLPIR-python A python wrapper and toolkit for NLPIR
License: MIT License
NLPIR-python A python wrapper and toolkit for NLPIR
License: MIT License
From commit NLPIR-team/NLPIR@3194917 and NLPIR-team/NLPIR@336ba9d
from commit NLPIR-team/NLPIR@1b0f74f and NLPIR-team/NLPIR@680ca0f
Sync from NLPIR NLPIR-team/NLPIR@0e7a4bb
update NLPIR-team/NLPIR@ab6806d
update key_scanner from NLPIR-team/NLPIR@576aa96
Sync dll from this commit NLPIR-team/NLPIR@6abb39b
from nlpir.native import KeyExtract
from nlpir import native, PACKAGE_DIR, clean_logs, ictclas
for word, pos in ictclas.segment(test_str, pos_tagged=True):
print(word, pos)
json_out = native.OUTPUT_FORMAT_JSON
def get_key_extract(encode=native.UTF8_CODE):
return KeyExtract(encode=encode)
key_extract = get_key_extract()
word_lists = key_extract.get_key_words("法国启蒙**家孟德斯鸠曾说过")
print(word_lists)
分词功能可以正常使用,但是关键词提取的时候异常退出,请问这是什么问题呢
Process finished with exit code -1073740940 (0xC0000374)
Text similarity need NLPIR.user, waiting for NLPIR-team/NLPIR update new DLL
Update dll from this commit:
NLPIR-team/NLPIR@c635f15
from commit NLPIR-team/NLPIR@869636f and NLPIR-team/NLPIR@8c0a251 to support ARMv8 64
The error info is listed below:
st=sentiment.SentimentNew()
Traceback (most recent call last):
File "", line 1, in
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nlpir/native/sentiment.py", line 22, in init
super().__init__(encode, lib_path, data_path, license_code)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nlpir/native/nlpir_base.py", line 132, in init
self.lib_nlpir, self.lib_path = self.load_library(sys.platform)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nlpir/native/nlpir_base.py", line 224, in load_library
lib_nlpir = ctypes.cdll.LoadLibrary(lib)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ctypes/init.py", line 426, in LoadLibrary
return self._dlltype(name)
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/ctypes/init.py", line 348, in init
self._handle = _dlopen(self._name, mode)
OSError: dlopen(/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nlpir/lib/libSentimentNewdarwin.so, 6): no suitable image found. Did find:
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nlpir/lib/libSentimentNewdarwin.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x00
/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/nlpir/lib/libSentimentNewdarwin.so: unknown file type, first eight bytes: 0x7F 0x45 0x4C 0x46 0x02 0x01 0x01 0x0
current pytest will occur test fail causing by user dict, and this user dict can't clean before the process exit
make singleton for native class
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.