Okay, I understand the problem. I would do something like the solution
you propose, except that in the input file, trees span multiple lines. So
the input file looks something like:
(:cat S
:subs ((() (:cat NP
:subs ((() (:surf "John")))))
(() (:cat VP
:subs ((() (:surf "bought"))
(() (:cat NP
:subs ((() (:surf "two"))
(() (:surf "cars"))))))))
(() (:surf "."))))
and then there will be another one directly following it (i detect the
breaks because each one is completely surrounded in parens).
So a line-by-line parse solution won't really do the job...
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell