mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-05-24 18:28:55 -06:00
Tense to Common ; Idiom ; Text
This commit is contained in:
@@ -71,6 +71,7 @@ formatAsTextGen tag para = unwords . format . cap . words where
|
|||||||
w : c : ww | major c -> format $ (w ++ c) :(cap ww)
|
w : c : ww | major c -> format $ (w ++ c) :(cap ww)
|
||||||
w : c : ww | minor c -> format $ (w ++ c) : ww
|
w : c : ww | minor c -> format $ (w ++ c) : ww
|
||||||
p : c : ww | openp p -> format $ (p ++ c) :ww
|
p : c : ww | openp p -> format $ (p ++ c) :ww
|
||||||
|
p : c : ww | spanish p -> format $ (p ++ concat (cap [c])) :ww
|
||||||
c : ww | para c -> "\n\n" : format ww
|
c : ww | para c -> "\n\n" : format ww
|
||||||
w : ww -> w : format ww
|
w : ww -> w : format ww
|
||||||
[] -> []
|
[] -> []
|
||||||
@@ -81,6 +82,7 @@ formatAsTextGen tag para = unwords . format . cap . words where
|
|||||||
major = flip elem (map singleton ".!?")
|
major = flip elem (map singleton ".!?")
|
||||||
minor = flip elem (map singleton ",:;)")
|
minor = flip elem (map singleton ",:;)")
|
||||||
openp = all (flip elem "(")
|
openp = all (flip elem "(")
|
||||||
|
spanish = all (flip elem "¡¿")
|
||||||
|
|
||||||
formatAsCode :: String -> String
|
formatAsCode :: String -> String
|
||||||
formatAsCode = rend 0 . words where
|
formatAsCode = rend 0 . words where
|
||||||
|
|||||||
@@ -110,6 +110,6 @@ linearize mgr lang =
|
|||||||
linTree2string noMark (canModules mgr) (zIdent lang)
|
linTree2string noMark (canModules mgr) (zIdent lang)
|
||||||
where
|
where
|
||||||
sgr = stateGrammarOfLangOpt False mgr (zIdent lang)
|
sgr = stateGrammarOfLangOpt False mgr (zIdent lang)
|
||||||
untok = customOrDefault noOptions useUntokenizer customUntokenizer sgr
|
untok = customOrDefault (stateOptions sgr) useUntokenizer customUntokenizer sgr
|
||||||
|
|
||||||
showTree t = prt_ $ tree2exp t
|
showTree t = prt_ $ tree2exp t
|
||||||
|
|||||||
Reference in New Issue
Block a user