I downloaded pattern module using pip. Then, when I try to run the example given in readme file, a StopIteration is being raised.
`
(ProjectIM) PS C:\Users\Sourav Kannantha B\Documents\ProjectIM\go bot> py .\pattern_ex.py
Traceback (most recent call last):
File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\lib\site-packages\pattern\text__init__.py", line 609, in _read
raise StopIteration
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\go bot\pattern_ex.py", line 11, in
v = tag(s)
File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\lib\site-packages\pattern\text\en__init.py", line 188, in tag
for sentence in parse(s, tokenize, True, False, False, False, encoding, *kwargs).split():
File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\lib\site-packages\pattern\text\en__init__.py", line 169, in parse
return parser.parse(s, args, kwargs)
File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\lib\site-packages\pattern\text__init__.py", line 1172, in parse
s[i] = self.find_tags(s[i], kwargs)
File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\lib\site-packages\pattern\text\en__init.py", line 114, in find_tags
return _Parser.find_tags(self, tokens, **kwargs)
File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\lib\site-packages\pattern\text__init__.py", line 1113, in find_tags
lexicon = kwargs.get("lexicon", self.lexicon or {}),
File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\lib\site-packages\pattern\text\init.py", line 376, in len__
return self._lazy("len")
File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\lib\site-packages\pattern\text__init__.py", line 368, in _lazy
self.load()
File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\lib\site-packages\pattern\text\init.py", line 625, in load
dict.update(self, (x.split(" ")[:2] for x in _read(self._path) if len(x.split(" ")) > 1))
File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\lib\site-packages\pattern\text\init__.py", line 625, in
dict.update(self, (x.split(" ")[:2] for x in _read(self._path) if len(x.split(" ")) > 1))
RuntimeError: generator raised StopIteration
`
I downloaded pattern module using pip. Then, when I try to run the example given in readme file, a StopIteration is being raised. ` (ProjectIM) PS C:\Users\Sourav Kannantha B\Documents\ProjectIM\go bot> py .\pattern_ex.py Traceback (most recent call last): File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\lib\site-packages\pattern\text__init__.py", line 609, in _read raise StopIteration StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last): File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\go bot\pattern_ex.py", line 11, in
v = tag(s)
File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\lib\site-packages\pattern\text\en__init.py", line 188, in tag
for sentence in parse(s, tokenize, True, False, False, False, encoding, *kwargs).split():
File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\lib\site-packages\pattern\text\en__init__.py", line 169, in parse
return parser.parse(s, args, kwargs)
File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\lib\site-packages\pattern\text__init__.py", line 1172, in parse
s[i] = self.find_tags(s[i], kwargs)
File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\lib\site-packages\pattern\text\en__init.py", line 114, in find_tags
return _Parser.find_tags(self, tokens, **kwargs)
File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\lib\site-packages\pattern\text__init__.py", line 1113, in find_tags
lexicon = kwargs.get("lexicon", self.lexicon or {}),
File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\lib\site-packages\pattern\text\init.py", line 376, in len__
return self._lazy("len")
File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\lib\site-packages\pattern\text__init__.py", line 368, in _lazy
self.load()
File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\lib\site-packages\pattern\text\init.py", line 625, in load
dict.update(self, (x.split(" ")[:2] for x in _read(self._path) if len(x.split(" ")) > 1))
File "C:\Users\Sourav Kannantha B\Documents\ProjectIM\lib\site-packages\pattern\text\init__.py", line 625, in
dict.update(self, (x.split(" ")[:2] for x in _read(self._path) if len(x.split(" ")) > 1))
RuntimeError: generator raised StopIteration
`