Skip to content
New issue

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

When I set parameter "flair_model='ner'", encounter KeyError: 'entities' #9

Open
DieselDX opened this issue May 20, 2023 · 1 comment

Comments

@DieselDX
Copy link

When I config model1 = cyner.CyNER(transformer_model='xlm-roberta-large', use_heuristic=True, flair_model='ner', priority='HTFS'), the program went wrong, python gave the following feedback.

Traceback (most recent call last):
File "E:\PythonProject\CyNER\main.py", line 9, in
entities = model.get_entities(text)
File "C:\ProgramData\Anaconda3\lib\site-packages\cyner\cyner.py", line 60, in get_entities
entities = model.get_entities(text)
File "C:\ProgramData\Anaconda3\lib\site-packages\cyner\flair_ner.py", line 24, in get_entities
for x in pred['entities']:
KeyError: 'entities'

Anyone can help me, pls. /(ㄒoㄒ)/~~

@SeungHo0422
Copy link

I have a same problem too

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants