Giter VIP home page Giter VIP logo

nlpir-python's Issues

关键词提取模块使用报错

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)

Error when using sentiment analysis

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

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.