From 376b3a36321d1ba2bd687699c58fa9240138a839 Mon Sep 17 00:00:00 2001 From: "Silas S. Brown" <ssb22@cam.ac.uk> Date: Tue, 7 Nov 2017 09:24:18 +0000 Subject: [PATCH] Update Annotator Generator git-svn-id: http://svn.code.sf.net/p/e-guidedog/code/ssb22/adjuster@2963 29193198-4895-4776-b068-10539e920549 --- annogen.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/annogen.py b/annogen.py index 0d042fd..450c605 100755 --- a/annogen.py +++ b/annogen.py @@ -3096,11 +3096,11 @@ def matchingAction(rule,glossDic,glossMiss,whitelist): wStart = w.index(markupStart)+len(markupStart) wEnd = w.index(markupMid,wStart) text_unistr = w[wStart:wEnd] - if whitelist and not text_unistr in whitelist: - return text_unistr+" not whitelisted",None mStart = wEnd+len(markupMid) annotation_unistr = w[mStart:w.index(markupEnd,mStart)] if mreverse: text_unistr,annotation_unistr = annotation_unistr,text_unistr + if whitelist and not text_unistr in whitelist: + return text_unistr+" not whitelisted",None gloss = glossDic.get((text_unistr,annotation_unistr),glossDic.get(text_unistr,None)) if gloss: gloss = gloss.replace('&','&').replace('"','"') # because it'll be in a title= attribute if reannotator: -- GitLab