mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-21 09:02:50 -06:00
fix the callback for unknown words as well
This commit is contained in:
@@ -544,10 +544,11 @@ nerc pgf (lang,concr) lin_idx sentence offset =
|
|||||||
chunk :: LiteralCallback
|
chunk :: LiteralCallback
|
||||||
chunk _ (_,concr) lin_idx sentence offset =
|
chunk _ (_,concr) lin_idx sentence offset =
|
||||||
case uncapitalized (drop offset sentence) of
|
case uncapitalized (drop offset sentence) of
|
||||||
Just (word@(_:_),rest) | null (lookupMorpho concr word) ->
|
Just (word0@(_:_),rest) | null (lookupMorpho concr word) ->
|
||||||
Just (expr,0,length sentence-length rest)
|
Just (expr,0,offset+length word)
|
||||||
where
|
where
|
||||||
expr = mkApp "MkSymb" [mkStr (trimRight word)]
|
word = trimRight word0
|
||||||
|
expr = mkApp "MkSymb" [mkStr word]
|
||||||
_ -> Nothing
|
_ -> Nothing
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user