the NERC in C is now fully up-to-date with the other NERCs. In addition the NERC in Haskell and Java now refuses to recognize names that match words in the lexicon. The latest is useful for German

This commit is contained in:
krasimir
2015-05-19 07:26:56 +00:00
parent 36741cbbf2
commit 4347ce727a
3 changed files with 114 additions and 39 deletions

View File

@@ -577,11 +577,9 @@ nerc pgf (lang,concr) lin_idx sentence offset =
"PN" -> retLit (mkApp lemma [])
"WeekDay" -> retLit (mkApp "weekdayPN" [mkApp lemma []])
"Month" -> retLit (mkApp "monthPN" [mkApp lemma []])
"Language" -> Nothing
_ -> pn
_ -> Nothing
where
retLit e = --traceShow (name,e,drop end_offset sentence) $
Just (e,0,end_offset)
retLit e = Just (e,0,end_offset)
where end_offset = offset+length name
pn = retLit (mkApp "SymbPN" [mkApp "MkSymb" [mkStr name]])
((lemma,cat),_) = maximumBy (compare `on` snd) (reverse ls)