Using NLTK3.0 with Jython
monisha kanakaraj <[email protected]>
| Newsgroups | gmane.comp.lang.jython.user |
|---|---|
| Message-ID | <CAHra3KZX30wr4ZDO38RBMLtNkpLgVDrJaw9pnY-F54nSecrfFg@mail.gmail.com> |
Hi,
I want to use NLTK 3.0 with Jython.
I have tried Jython2.5.3 and Jython2.7beta3 versions with Pyhton 2.7.3
version.
when running 'import nltk' in the in the Jython shells i get the following
errors
1. Jython2.5.3 with Pyhton 2.7.3 & NLTK 3.0
>>> import sys
>>> sys.path.append('/usr/local/lib/python2.7/dist-packages/')
>>> import nltk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/nltk/__init__.py", line 35
except IOError as ex:
^
SyntaxError: mismatched input 'as' expecting COLON
2. jython2.7b3 with Pyhton 2.7.3 & NLTK 3.0
>>> import sys
>>> sys.path.append('/usr/local/lib/python2.7/dist-packages/')
>>> import nltk
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/usr/local/lib/python2.7/dist-packages/nltk/__init__.py", line 104,
in <module>
from nltk.decorators import decorator, memoize
File "/usr/local/lib/python2.7/dist-packages/nltk/decorators.py", line
183, in <module>
@decorator
File "/usr/local/lib/python2.7/dist-packages/nltk/decorators.py", line
172, in decorator
return update_wrapper(_decorator, caller)
File "/usr/local/lib/python2.7/dist-packages/nltk/decorators.py", line
83, in update_wrapper
infodict = infodict or getinfo(model)
File "/usr/local/lib/python2.7/dist-packages/nltk/decorators.py", line
76, in getinfo
return dict(name=func.__name__, argnames=argnames, signature=signature,
AttributeError: 'function' object has no attribute '__defaults__'
I have also gone through the mail thread
http://sourceforge.net/p/jython/mailman/message/32929832/, where the final
conclusion i understood is to wait for beta4 release of jython2.7.
My question is can I get any patch to work with jython2.7b3 with Pyhton
2.7.3 & NLTK 3.0? If so kindly help me in adding the patch.
Or is there a way to rectify the mismatched input 'as' expecting COLON error
in Jython2.5.3 with Pyhton 2.7.3 & NLTK 3.0?
Kindly help.
Thanks in advance.
------------------------------------------------------------------------------
Download BIRT iHub F-Type - The Free Enterprise-Grade BIRT Server
from Actuate! Instantly Supercharge Your Business Reports and Dashboards
with Interactivity, Sharing, Native Excel Exports, App Integration & more
Get technology previously reserved for billion-dollar corporations, FREE
http://pubads.g.doubleclick.net/gampad/clk?id=164703151&iu=/4140/ostg.clktrk
_______________________________________________
Jython-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jython-users