1. Pypy
  2. Untitled project
  3. compatibility

Wiki

Clone wiki

compatibility / nltk

NLTK

UPDATE: nltk should now be compilable & installable under 1.6.1 out-of-the-box: http://code.google.com/p/nltk/issues/detail?id=721 Could anyone test it please?

NLTK tested to be compatible with PyPy 1.8: http://pyinsci.blogspot.com.br/2012/04/benchmarking-nltk-under-pypy.html


URL:http://www.nltk.org/
Category:Scientific libraries
Compatible:Compatible More Information
Soft Dependencies
PyYAMLCompatible More Information
matplotlibIncompatible
NumpyIncompatible More Information
Prover9
MaltParser
MegaM

Older details (perhaps out-of-the-date)

NLTK can't be built by PyPy 1.6.1-rc due to https://bugs.pypy.org/issue846 See the exact error output below. However, according to https://groups.google.com/group/nltk-dev/browse_thread/thread/7dd4048beacb832a :

 But if you just change line 282 in .../nltk/sourcedstring.py into: 
    class SourcedString(object): 

and then it builds OK.

/tmp/nltk-2.0.1rc1$ pypy setup.py build
Traceback (most recent call last):
  File "app_main.py", line 51, in run_toplevel
  File "setup.py", line 13, in <module>
    import nltk
  File "/tmp/nltk-2.0.1rc1/nltk/__init__.py", line 113, in <module>
    import inference; from inference import *
  File "/tmp/nltk-2.0.1rc1/nltk/inference/__init__.py", line 19, in <module>
    from discourse import *
  File "/tmp/nltk-2.0.1rc1/nltk/inference/discourse.py", line 21, in <module>
    from nltk.sem.glue import DrtGlue
  File "/tmp/nltk-2.0.1rc1/nltk/sem/glue.py", line 15, in <module>
    from nltk.corpus import brown
  File "/tmp/nltk-2.0.1rc1/nltk/corpus/__init__.py", line 77, in <module>
    from reader import *
  File "/tmp/nltk-2.0.1rc1/nltk/corpus/reader/__init__.py", line 64, in <module>
    from nltk.corpus.reader.plaintext import *
  File "/tmp/nltk-2.0.1rc1/nltk/corpus/reader/plaintext.py", line 19, in <module>
    from util import *
  File "/tmp/nltk-2.0.1rc1/nltk/corpus/reader/util.py", line 26, in <module>
    from nltk.sourcedstring import SourcedStringStream
  File "/tmp/nltk-2.0.1rc1/nltk/sourcedstring.py", line 282, in <module>
    class SourcedString(basestring):
TypeError: type 'basestring' is not an acceptable base class

Updated