Sto tentando di utilizzare NLTK, il toolkit del linguaggio naturale stanford. Dopo installare i file necessari, inizio a eseguire il codice demo: http://www.nltk.org/index.htmlNLTK non è stato in grado di trovare il file gs
>>> import nltk
>>> sentence = """At eight o'clock on Thursday morning
... Arthur didn't feel very good."""
>>> tokens = nltk.word_tokenize(sentence)
>>> tokens
['At', 'eight', "o'clock", 'on', 'Thursday', 'morning',
'Arthur', 'fatto', "non", 'sentire', 'molto', 'buono', ' ']
>>> tagged = nltk.pos_tag(tokens)
>>> tagged[0:6]
[('At', 'IN'), ('eight', 'CD'), ("o'clock", 'JJ'), ('on', 'IN'),
(' Giovedi', 'NNP'), ('mattina', 'NN')]
>>> entities = nltk.chunk.ne_chunk(tagged)
>>> entities
Allora ottengo un messaggio:
LookupError:
===========================================================================
NLTK was unable to find the gs file!
Use software specific configuration paramaters or set the PATH environment variable.
Ho provato google, ma non c'è nessuno che dica quale sia il file gs mancante.
Per utenti Mac, è possibile installare ghostscript tramite brew '' 'brew install ghostscript'''. Per altri sistemi operativi, le istruzioni possono essere trovate qui: https://wiki.scribus.net/canvas/Installation_and_Configuration_of_Ghostscript – naoko
Ho installato ghostscript e sto ancora ricevendo lo stesso errore, anche se una ricerca di Windows mostra un file "gswin64c.exe" . –