From b8177d532359f882af0b681205ce1d4de850dc39 Mon Sep 17 00:00:00 2001 From: Victor Zimmermann <zimmermann@cl.uni-heidelberg.de> Date: Wed, 7 Mar 2018 15:03:05 +0100 Subject: [PATCH] Add .lower() for contexts --- code/absinth_nx.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/code/absinth_nx.py b/code/absinth_nx.py index baef7fe..3b97902 100644 --- a/code/absinth_nx.py +++ b/code/absinth_nx.py @@ -198,6 +198,7 @@ def disambiguate(mst, hubs, contexts): for c in contexts: + c = c.lower() toks = [t.text for t in nlp(c)] vector = np.sum([T.nodes[t]['s'] if t in T.nodes else np.zeros(len(H)) for t in toks], axis=0) @@ -260,6 +261,7 @@ if __name__ == '__main__': target = value.strip() print("[A] Processing '"+target+"'.\n") + f = open(results_path+target+'.absinth', 'w') f.write('subTopicID\tresultID\n') -- GitLab