mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-19 16:12:52 -06:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user