mirror of
https://github.com/GrammaticalFramework/gf-core.git
synced 2026-04-24 03:52:50 -06:00
one missing case in dep trees
This commit is contained in:
@@ -90,6 +90,7 @@ dependencyTree ms pgf lang exp = prGraph True lin2dep where
|
|||||||
hx = headArg (init x) tr x
|
hx = headArg (init x) tr x
|
||||||
|
|
||||||
headArg x0 tr x = case (tr,x) of
|
headArg x0 tr x = case (tr,x) of
|
||||||
|
(Fun f [],[_]) -> x0 ---- ??
|
||||||
(Fun f ts,[_]) -> x0 ++ [length ts - 1] ---- TODO: head as other than last arg
|
(Fun f ts,[_]) -> x0 ++ [length ts - 1] ---- TODO: head as other than last arg
|
||||||
(Fun f ts,i:y) -> headArg x0 (ts !! i) y
|
(Fun f ts,i:y) -> headArg x0 (ts !! i) y
|
||||||
|
|
||||||
@@ -98,10 +99,6 @@ dependencyTree ms pgf lang exp = prGraph True lin2dep where
|
|||||||
(Fun f ts,[_]) -> showCId f ++ "#" ++ show (last (0:x)) ----
|
(Fun f ts,[_]) -> showCId f ++ "#" ++ show (last (0:x)) ----
|
||||||
(Fun f ts,i:y) -> label (ts !! i) y x
|
(Fun f ts,i:y) -> label (ts !! i) y x
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
word x = if elem x sortedNodes then x else
|
word x = if elem x sortedNodes then x else
|
||||||
let x' = headArg x tr (x ++[0]) in
|
let x' = headArg x tr (x ++[0]) in
|
||||||
if x' == x then [] else word x'
|
if x' == x then [] else word x'
|
||||||
|
|||||||
Reference in New Issue
Block a user