From 83fb2ea03365d00e8a7e3277e4224b1e8d1eb7e0 Mon Sep 17 00:00:00 2001 From: Kai Date: Mon, 25 May 2020 15:10:08 +0200 Subject: [PATCH] enable NED only usage of find-entities --- cli.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli.py b/cli.py index 32b9195..b706773 100644 --- a/cli.py +++ b/cli.py @@ -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.")