the Literals API in Haskell no longer offers the sentence as an argument to the callbacks. It is just as easy to save the sentence in a closure and by doing that we save the repeated round about from C to Haskell strings

This commit is contained in:
krasimir
2016-05-11 11:10:22 +00:00
parent 9abc6aadde
commit 86c5423275
5 changed files with 14 additions and 17 deletions

View File

@@ -50,7 +50,7 @@ translates pgf cfrom cto cat (mxt,mxv) s0 =
cparse pgf concr cat input = parseWithHeuristics concr cat input (-1) callbacks where
callbacks = maybe [] cb $ lookup "App" literalCallbacks
cb fs = [(cat,f pgf ("TranslateEng",concr))|(cat,f)<-fs]
cb fs = [(cat,f pgf ("TranslateEng",concr) input)|(cat,f)<-fs]
lextext cnc = unwords . lexText' (\w -> case lookupMorpho cnc w of
_:_ -> w