aiforsec / CyNER

Cyber Security concepts extracted from unstructured threat intelligence reports using Named Entity Recognition
MIT License
91 stars 30 forks source link

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

Open DieselDX opened 1 year ago

DieselDX commented 1 year ago

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 commented 9 months ago

I have a same problem too