mirror of
https://github.com/qurator-spk/page2tsv.git
synced 2025-08-01 13:19:54 +02:00
enable NED only usage of find-entities
This commit is contained in:
parent
c12bea2cb0
commit
83fb2ea033
1 changed files with 1 additions and 1 deletions
2
cli.py
2
cli.py
|
@ -336,7 +336,7 @@ def find_entities(tsv_file, tsv_out_file, ner_rest_endpoint, ned_rest_endpoint,
|
||||||
tmp = tsv.copy()
|
tmp = tsv.copy()
|
||||||
tmp['sen'] = (tmp['No.'] == 0).cumsum()
|
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')]
|
for _, sen in tmp.groupby('sen')]
|
||||||
else:
|
else:
|
||||||
raise RuntimeError("Either NER rest endpoint or NER-TAG information within tsv_file required.")
|
raise RuntimeError("Either NER rest endpoint or NER-TAG information within tsv_file required.")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue