in reply to PERL and TREE

I'm not clear - are you building the tree from pre-parsed text (i.e. word's part of speech is already assigned?) or are you trying to parse the text and put it in a tree structure?

If you are primarily concerned with building and navigating a tree structure, you might want to check out Tree::MultiNode and search CPAN for the keyword Tree if that does not suit.

If actually parsing and assigning words to parts of speech is your goal, you have your work cut out for you, but there are also some natural language processing modules on CPAN as well. Searching for NLP (natural language processing), I found modules that interface with Alvis and Ogmios. You might also want to check out Lingua::YaTeA. However, this only handles noun phrases and outputs in Head-Modifier format

Also you might want to say a bit more about what you are trying to do. For example, word distance is often part of search algorithms. If that is your goal, I imagine there are a few search experts who are lurking and might be helpful.

Best, beth

Replies are listed 'Best First'.
Re^2: PERL and TREE
by Anonymous Monk on Feb 11, 2009 at 14:32 UTC
    Thanks for your reply, indeed I'm building the tree from pre-parsed text, indeed i parse the text and then wanna build a tree on based. in other words, my problem is to convert the parsed text with nested parenthesis to tree structure.