From 191ecc71b8b4645caf992822e18d4b506f0e55a4 Mon Sep 17 00:00:00 2001 From: aarne Date: Sun, 10 Jun 2012 10:43:57 +0000 Subject: command option ma -known to drop unknown words --- src/compiler/GF/Command/Commands.hs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/compiler') diff --git a/src/compiler/GF/Command/Commands.hs b/src/compiler/GF/Command/Commands.hs index 3b6e278d0..18194f340 100644 --- a/src/compiler/GF/Command/Commands.hs +++ b/src/compiler/GF/Command/Commands.hs @@ -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") ] }), -- cgit v1.2.3