added a paraphrase method applying def's in both directions, in subtrees, and step by step; doesn't work properly yet

This commit is contained in:
aarne
2008-10-13 16:41:21 +00:00
parent a643cc522d
commit 8abf7f5c8a
3 changed files with 108 additions and 2 deletions

View File

@@ -5,7 +5,7 @@ module GF.Command.TreeOperations (
) where
import GF.Compile.TypeCheck
import PGF (compute)
import PGF (compute,paraphrase)
-- for conversions
import PGF.Data
@@ -24,6 +24,8 @@ allTreeOps :: PGF -> [(String,(String,TreeOp))]
allTreeOps pgf = [
("compute",("compute by using semantic definitions (def)",
map (compute pgf))),
("paraphrase",("paraphrase by using semantic definitions (def)",
concatMap (paraphrase pgf))),
("smallest",("sort trees from smallest to largest, in number of nodes",
smallest)),
("typecheck",("type check and solve metavariables; reject if incorrect",