diff options
| author | Aarne Ranta <aarne@chalmers.se> | 2017-12-06 17:37:12 +0100 |
|---|---|---|
| committer | Aarne Ranta <aarne@chalmers.se> | 2017-12-06 17:37:12 +0100 |
| commit | 79feeaf5b8f4a7b1a9bcf5f08cec19d2164fdfc4 (patch) | |
| tree | 9b035d64a261098f8675baf485ad16da1db10b25 /src | |
| parent | 98db9a257fb68ac790e45ebccdb09999a871e18d (diff) | |
new option linerize -tabtreebank for tab-separated treebank generation
Diffstat (limited to 'src')
| -rw-r--r-- | src/compiler/GF/Command/Commands.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/compiler/GF/Command/Commands.hs b/src/compiler/GF/Command/Commands.hs index 27b72b5c4..3ca2ab962 100644 --- a/src/compiler/GF/Command/Commands.hs +++ b/src/compiler/GF/Command/Commands.hs @@ -275,6 +275,7 @@ pgfCommands = Map.fromList [ ("list","show all forms and variants, comma-separated on one line (cf. l -all)"), ("multi","linearize to all languages (default)"), ("table","show all forms labelled by parameters"), + ("tabtreebank","show the tree and its linearizations on a tab-separated line"), ("treebank","show the tree and tag linearizations with language names") ] ++ stringOpOptions, flags = [ @@ -791,6 +792,9 @@ pgfCommands = Map.fromList [ _ | isOpt "treebank" opts -> (showCId (abstractName pgf) ++ ": " ++ showExpr [] t) : [showCId lang ++ ": " ++ s | lang <- optLangs pgf opts, s<-linear pgf opts lang t] + _ | isOpt "tabtreebank" opts -> + return $ concat $ intersperse "\t" $ (showExpr [] t) : + [s | lang <- optLangs pgf opts, s <- linear pgf opts lang t] _ | isOpt "chunks" opts -> map snd $ linChunks pgf opts t _ -> [s | lang <- optLangs pgf opts, s<-linear pgf opts lang t] linChunks pgf opts t = |
