mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-05 09:12:51 -06:00
for backward compatibility we have the old parse function again. the old functionality is exposed by parse_
This commit is contained in:
@@ -897,7 +897,7 @@ allCommands env@(pgf, mos) = Map.fromList [
|
||||
]
|
||||
where
|
||||
par opts s = case optOpenTypes opts of
|
||||
[] -> [parse pgf lang (optType opts) s | lang <- optLangs opts]
|
||||
[] -> [parse_ pgf lang (optType opts) s | lang <- optLangs opts]
|
||||
open_typs -> [parseWithRecovery pgf lang (optType opts) open_typs s | lang <- optLangs opts]
|
||||
|
||||
void = ([],[])
|
||||
|
||||
@@ -41,7 +41,7 @@ convertFile conf src file = do
|
||||
convEx (cat,ex) = do
|
||||
appn "("
|
||||
let typ = maybe (error "no valid cat") id $ readType cat
|
||||
ws <- case fst (parse pgf lang typ ex) of
|
||||
ws <- case fst (parse_ pgf lang typ ex) of
|
||||
ParseFailed _ -> do
|
||||
let ws = morphoMissing morpho (words ex)
|
||||
appv ("WARNING: cannot parse example " ++ ex)
|
||||
|
||||
@@ -46,10 +46,7 @@ translationList mex mprobs pgf ig og typ number = do
|
||||
return $ map mkOne $ ts
|
||||
where
|
||||
mkOne t = (norml (linearize pgf ig t), map (norml . linearize pgf og) (homonyms t))
|
||||
homonyms t =
|
||||
case (fst . parse pgf ig typ . linearize pgf ig) t of
|
||||
ParseResult ts -> ts
|
||||
_ -> []
|
||||
homonyms = parse pgf ig typ . linearize pgf ig
|
||||
|
||||
morphologyList ::
|
||||
Maybe Expr -> Maybe Probabilities ->
|
||||
|
||||
Reference in New Issue
Block a user