Getting Python module nltk.wordnet to work in Jython

I read the Jython FAQ and this post by Jython and python modules , but not sure how I can determine if the module is written exclusively in C or Python.

The problem I encountered is mentioned here http://old.nabble.com/using-NLTK-in-Jython-td28520926.html

Can anyone who did this shed light on this? I am new to Jython.

Thank,

+3
source share
2 answers

C:\Python26\Lib\site-packages\nltk sys.path, ? C:\Python26\Lib\site-packages, , nltk. site-packages, nltk .

+2

Eclipse, (nltk site-packages) . jar nltk, yaml . ,

jar -cf nltk.jar /Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/nltk
jar -cf yaml.jar /Library/Frameworks/Python.framework/Versions/7.0/lib/python2.7/site-packages/yaml

Jython jar, lib dir,

sys.path.append("/Users/peter/phd/lib/yaml.jar")
sys.path.append("/Users/peter/phd/lib/nltk.jar")

Eclipse, NLTK.

, , - .

+1

Source: https://habr.com/ru/post/1755156/


All Articles