nltk NgramModel error

0 votes
The NgramModel class in nltk was working fine without error. However, I recently updated nltk to version 3.1 and I can no longer find the NgramModel class. When I try to import as usual:

from nltk.model import NgramModel

I get the error

ImportError: No module named 'nltk.model'.

Has NgramModel or the model module been recently replaced? is there any other process?
May 15 in Python by ana1504.k
• 6,150 points

1 answer to this question.

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
0 votes
This is an open issue because of bugs.

If you're currently using the version from github, you can switch to the "model" branch, which includes the NgramModel code, though it's currently significantly behind the "develop" branch and hasn't picked up all the newest bug fixes.
answered May 15 by SDeb
• 9,740 points

Related Questions In Python

+2 votes
2 answers

Error while printing hello world in python.

You must be trying this command in ...READ MORE

answered Mar 31, 2018 in Python by GandalfDwhite
• 1,320 points
0 votes
2 answers

Indentation Error in Python

Use tabs instead of spaces. This is ...READ MORE

answered Feb 14 in Python by Shashank
• 1,350 points
0 votes
1 answer

'Syntax Error: invalid syntax' for no apparent reason

You're missing a close paren in this ...READ MORE

answered Aug 13, 2018 in Python by Priyaj
• 56,120 points
+1 vote
1 answer

How to print an error in Python?

For Python 2.6 and later and Python ...READ MORE

answered Aug 23, 2018 in Python by Priyaj
• 56,120 points
0 votes
1 answer

how can i count the items in a list?

suppose you have a list a = [0,1,2,3,4,5,6,7,8,9,10] now ...READ MORE

answered May 2 in Python by Mohammad
• 1,400 points
0 votes
1 answer

Key error in Python

A KeyError occurs when the Key doesn't ...READ MORE

answered Sep 20, 2018 in Python by SDeb
• 9,740 points
0 votes
10 answers

© 2018 Brain4ce Education Solutions Pvt. Ltd. All rights Reserved.
"PMP®","PMI®", "PMI-ACP®" and "PMBOK®" are registered marks of the Project Management Institute, Inc. MongoDB®, Mongo and the leaf logo are the registered trademarks of MongoDB, Inc.