command option ma -known to drop unknown words

This commit is contained in:
aarne
2012-06-10 10:43:57 +00:00
parent 12b2a0d665
commit 191ecc71b8
2 changed files with 16 additions and 4 deletions

View File

@@ -521,6 +521,10 @@ allCommands env@(pgf, mos) = Map.fromList [
return . fromString . unwords .
morphoMissing (optMorpho opts) .
concatMap words . toStrings
_ | isOpt "known" opts ->
return . fromString . unwords .
morphoKnown (optMorpho opts) .
concatMap words . toStrings
_ -> return . fromString . unlines .
map prMorphoAnalysis . concatMap (morphos opts) .
concatMap words . toStrings ,
@@ -528,7 +532,8 @@ allCommands env@(pgf, mos) = Map.fromList [
("lang","the languages of analysis (comma-separated, no spaces)")
],
options = [
("missing","show the list of unknown words in the input")
("known", "return only the known words, in order of appearance"),
("missing","show the list of unknown words, in order of appearance")
]
}),