diff options
| author | krasimir <krasimir@chalmers.se> | 2015-02-18 16:47:33 +0000 |
|---|---|---|
| committer | krasimir <krasimir@chalmers.se> | 2015-02-18 16:47:33 +0000 |
| commit | f3797bb313f8ecd75466ad15b00afa3e5ad1af55 (patch) | |
| tree | 822a2c70b68708e74a9152eb474a3c2b86c6c5ec /src/runtime/haskell-bind | |
| parent | a97dee067a3ac8c36b1ff1604643fe3ac95d3bb1 (diff) | |
fix the callback for unknown words as well
Diffstat (limited to 'src/runtime/haskell-bind')
| -rw-r--r-- | src/runtime/haskell-bind/PGF2.hsc | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/runtime/haskell-bind/PGF2.hsc b/src/runtime/haskell-bind/PGF2.hsc index 8511a38d6..e0bd9c4b9 100644 --- a/src/runtime/haskell-bind/PGF2.hsc +++ b/src/runtime/haskell-bind/PGF2.hsc @@ -544,10 +544,11 @@ nerc pgf (lang,concr) lin_idx sentence offset = chunk :: LiteralCallback chunk _ (_,concr) lin_idx sentence offset = case uncapitalized (drop offset sentence) of - Just (word@(_:_),rest) | null (lookupMorpho concr word) -> - Just (expr,0,length sentence-length rest) + Just (word0@(_:_),rest) | null (lookupMorpho concr word) -> + Just (expr,0,offset+length word) where - expr = mkApp "MkSymb" [mkStr (trimRight word)] + word = trimRight word0 + expr = mkApp "MkSymb" [mkStr word] _ -> Nothing |
