Just for others maybe wondering this: I got this working.

For some reason ./sage -pip didn't work on test machine, but there was no problems on production server. What I did was

$ ./sage -i pip
$ ./sage -pip install nltk
$ ./sage
sage: import nltk
sage: nltk.download()

and last as root

# chmod -R a+rX ~sagecomp/nltk_data
# mv ~sagecomp/nltk_data /usr/share

and now I can run

import nltk
sentence = "At eight o'clock on Thursday morning Arthur didn't feel very good."
nltk.word_tokenize(sentence)

(This was on Ubuntu 14.04. I use 'sagecomp' for compiling Sage, 'sagegui' for running Sage and 'sagecalc' for computing, i.e. notebook() function has server_pool -option.)

--
Jori Mäntysalo

Reply via email to