I am trying to use the suggest function provided by pattern.en. But when i run the following script:
from pattern.en import suggest
corr = suggest("whitle")
It gives the following error:
Traceback (most recent call last):
File "C:UsersuserAppDataLocalProgramsPythonPython39libsite-packagespatternext\__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 "xxx", line 54, in <module>
corr = suggest("whitle")
File "C:UsersuserAppDataLocalProgramsPythonPython39libsite-packagespatternexten\__init__.py", line 207, in suggest
return spelling.suggest(w)
File "C:UsersuserAppDataLocalProgramsPythonPython39libsite-packagespatternext\__init__.py", line 2677, in suggest
if len(self) == 0:
File "C:UsersuserAppDataLocalProgramsPythonPython39libsite-packagespatternext\__init__.py", line 376, in __len__
return self._lazy("__len__")
File "C:UsersuserAppDataLocalProgramsPythonPython39libsite-packagespatternext\__init__.py", line 368, in _lazy
self.load()
File "C:UsersuserAppDataLocalProgramsPythonPython39libsite-packagespatternext\__init__.py", line 2621, in load
for x in _read(self._path):
RuntimeError: generator raised StopIteration
I am completely new to generators and have no idea what this error means. Any help would mean alot. Thanks.