Re: hGetContents and laziness in file io
24 Jul
2001
24 Jul
'01
7:17 p.m.
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...
9166
Age (days ago)
9166
Last active (days ago)
0 comments
1 participants
participants (1)
-
Hal Daume