1
0
forked from GitHub/gf-core

visualization of word alignment based on bracketing (command aw); does not work for syncategorematic words yet

This commit is contained in:
aarne
2008-12-15 10:33:53 +00:00
parent 3e293ae3e0
commit 10675e29ca
3 changed files with 112 additions and 3 deletions

View File

@@ -146,10 +146,11 @@ linTreeMark pgf lang = lin []
R ts -> R $ map (mark p) ts
FV ts -> R $ map (mark p) ts
S ts -> S $ bracket p ts
K s -> S $ bracket p [t]
K s -> S $ bracketw p [t]
W s (R ts) -> R [mark p $ kks (s ++ u) | K (KS u) <- ts]
_ -> t
-- otherwise in normal form
bracket p ts = [kks ("["++show p)] ++ ts ++ [kks "]"]
bracket p ts = [kks ("("++show p)] ++ ts ++ [kks ")"]
bracketw p ts = [kks ("{"++show p)] ++ ts ++ [kks "}"] -- for easy word alignment
sub p i = p ++ [i]