lyeoni / nlp-tutorial

A list of NLP(Natural Language Processing) tutorials
MIT License
1.36k stars 265 forks source link

No module named 'nltk.tokenize.moses' #2

Closed macrosea closed 4 years ago

macrosea commented 5 years ago

I had install nltk; but a error occur when I run the code; ModuleNotFoundError: No module named 'nltk.tokenize.moses'

lyeoni commented 5 years ago

Hi @macrosea Could you use the code below :) ?

$ pip install nltk==3.2.5
$ ipython
>>> import nltk
>>> nltk.download()
Skvortsovg commented 5 years ago

Hello @macrosea

MosesTokenizer has been moved out of NLTK due to licensing issues. You should install this pip install mosestokenizer nad replace your import from from nltk.tokenize.moses import * to from mosestokenizer import *

Also, you can use sacremoses. It is available via pip.