[Haskell-cafe] Libraries to compare trees?

dokondr dokondr at gmail.com
Thu Oct 27 14:49:41 CEST 2011

Please advise on Haskell libraries to compare trees in textual
I need to compare both structure and node contents of two trees, find
similar sub-trees, and need some metric to measure distance between two
Also need advice on simple parser to convert textual tree representation
into a data type convenient for tree manipulation (comparison, matching,
etc.) What data type to use for trees with arbitrary structure?

Example trees:

*** Tree 1:
    (NP (DT The) (NN voice) (NN quality))
    (VP (VBD was)
      (ADJP (JJ clear) (RB too)))
    (. .)))

*** Tree 2:
    (SBAR (IN Although)
        (NP (DT the) (NN battery) (NN life))
        (VP (VBD was) (RB not)
          (ADJP (JJ long)))))
    (, ,)
    (NP (DT that))
    (VP (VBZ is)
      (VP (VBN ok)
        (PP (IN for)
          (NP (PRP me)))))
    (. .)))

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111027/a63431e1/attachment.htm>

More information about the Haskell-Cafe mailing list