We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Environment: Python 3.5.2 nltk 3.2.1
reproduce step: python3 example.py
python3 example.py
error message:
Traceback (most recent call last): File "example.py", line 8, in <module> lm = KneserNeyLM(3, gut_ngrams, end_pad_symbol='<s>') File "/Users/username/kneser-ney/kneser_ney.py", line 24, in __init__ self.lm = self.train(ngrams) File "/Users/username/kneser-ney/kneser_ney.py", line 33, in train kgram_counts = self._calc_adj_counts(Counter(ngrams)) File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/collections/__init__.py", line 530, in __init__ self.update(*args, **kwds) File "/usr/local/Cellar/python3/3.5.2_3/Frameworks/Python.framework/Versions/3.5/lib/python3.5/collections/__init__.py", line 617, in update _count_elements(self, iterable) File "example.py", line 7, in <genexpr> pad_left=True, pad_right=True, pad_symbol='<s>')) TypeError: ngrams() got an unexpected keyword argument 'pad_symbol'
The text was updated successfully, but these errors were encountered:
Change it to (right_pad_symbol='</s>', left_pad_symbol='<s>')
(right_pad_symbol='</s>', left_pad_symbol='<s>')
Sorry, something went wrong.
No branches or pull requests
Environment:
Python 3.5.2
nltk 3.2.1
reproduce step:
python3 example.py
error message:
The text was updated successfully, but these errors were encountered: