I encountered this error while using the NER of polyglot:
Traceback (most recent call last):
File "data_extraction.py", line 177, in <module>
output_frame = output_frame.append(parse_company_name(row['stranka'].lower()), ignore_index=True)
File "data_extraction.py", line 102, in parse_company_name
for entity in text.entities:
File "/home/luca/projects/.venvs/mlpython/lib/python3.6/site-packages/polyglot/decorators.py", line 20, in __get__
value = obj.__dict__[self.func.__name__] = self.func(obj)
File "/home/luca/projects/.venvs/mlpython/lib/python3.6/site-packages/polyglot/text.py", line 140, in entities
if tag != u'O':
UnboundLocalError: local variable 'tag' referenced before assignment
There seems to be an easy fix, it looks like a simple indentation problem.
I'll submit a PR once I set everything up.
I encountered this error while using the NER of polyglot:
There seems to be an easy fix, it looks like a simple indentation problem. I'll submit a PR once I set everything up.