[Haskell-cafe] Libraries to compare trees?
dokondr
dokondr at gmail.com
Thu Oct 27 15:27:53 CEST 2011
My mistake: need advice on libraries and data types not for trees but for
directed graphs.
On Thu, Oct 27, 2011 at 4:49 PM, dokondr <dokondr at gmail.com> wrote:
> Please advise on Haskell libraries to compare trees in textual
> representation.
> 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
> trees.
> 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:
> (ROOT
> (S
> (NP (DT The) (NN voice) (NN quality))
> (VP (VBD was)
> (ADJP (JJ clear) (RB too)))
> (. .)))
>
>
> *** Tree 2:
> (ROOT
> (S
> (SBAR (IN Although)
> (S
> (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)))))
> (. .)))
>
> Thanks!
> Dmitri
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111027/a9c81d82/attachment.htm>
More information about the Haskell-Cafe
mailing list