example_based returns the list of all unknown words

This commit is contained in:
aarne
2010-01-28 16:27:28 +00:00
parent e056cc2bfd
commit d333c0564b
5 changed files with 37 additions and 22 deletions

View File

@@ -255,7 +255,8 @@ allCommands cod env@(pgf, mos) = Map.fromList [
let file = optFile opts
mprobs <- optProbs opts pgf
let conf = configureExBased pgf (optMorpho opts) mprobs (optLang opts)
file' <- parseExamplesInGrammar conf file
(file',ws) <- parseExamplesInGrammar conf file
if null ws then return () else putStrLn ("unknown words: " ++ unwords ws)
return (fromString ("wrote " ++ file')),
needsTypeCheck = False
}),