From f7ce8940fa0d53718eb30bfc7d0ef9320bafc673 Mon Sep 17 00:00:00 2001 From: aarne Date: Wed, 14 Mar 2007 12:11:18 +0000 Subject: ma -status; sep lines for l -all --- src/GF/UseGrammar/Morphology.hs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/GF/UseGrammar/Morphology.hs') diff --git a/src/GF/UseGrammar/Morphology.hs b/src/GF/UseGrammar/Morphology.hs index 313aa6fbc..3aeb08dc7 100644 --- a/src/GF/UseGrammar/Morphology.hs +++ b/src/GF/UseGrammar/Morphology.hs @@ -113,9 +113,14 @@ allMorphoWords = map fst . collapse -- analyse running text and show results either in short form or on separate lines --- | analyse running text and show results in short form +-- | analyse running text and show just the word, with "*" if not found +morphoTextStatus :: Morpho -> String -> String +morphoTextStatus mo = unlines . map (prMark . appMorpho mo) . words where + prMark (w,fs) = if null fs then "*" +++ w else w + +-- | analyse running text and show results in short form, one word per line morphoTextShort :: Morpho -> String -> String -morphoTextShort mo = unwords . map (prMorphoAnalysisShort . appMorpho mo) . words +morphoTextShort mo = unlines . map (prMorphoAnalysisShort . appMorpho mo) . words -- | analyse running text and show results on separate lines morphoText :: Morpho -> String -> String -- cgit v1.2.3