enable NED only usage of find-entities

pull/2/head
Kai 4 years ago
parent c12bea2cb0
commit 83fb2ea033

@ -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.")

Loading…
Cancel
Save