1
0
Fork 0
mirror of https://github.com/qurator-spk/page2tsv.git synced 2025-06-15 14:29:53 +02:00

enable NED only usage of find-entities

This commit is contained in:
Kai 2020-05-25 15:10:08 +02:00
parent c12bea2cb0
commit 83fb2ea033

2
cli.py
View file

@ -336,7 +336,7 @@ def find_entities(tsv_file, tsv_out_file, ner_rest_endpoint, ned_rest_endpoint,
tmp = tsv.copy()
tmp['sen'] = (tmp['No.'] == 0).cumsum()
ner_result = [[{'word': row.TOKEN, 'prediction': row['NE-TAG']} for _, row in sen.iterrows]
ner_result = [[{'word': row.TOKEN, 'prediction': row['NE-TAG']} for _, row in sen.iterrows()]
for _, sen in tmp.groupby('sen')]
else:
raise RuntimeError("Either NER rest endpoint or NER-TAG information within tsv_file required.")