From: Louis-Philippe Date: 2009-09-16T01:05:46+09:00 Subject: Re: How to convert an string like this into a tree Object? --0016e6d2716fb6d3d004739ff3ff Content-Type: text/plain; charset=ISO-8859-1 As always, Pascal is the best!That is, at showing everybody He can answer everything with Lisp ... 2009/9/15 Pascal J. Bourguignon > Possum writes: > > > Hi, guys , > > > > recently I'm working on stanford parser(written in java) which has an > > in-complete ruby rapper.I can get the result like this as a string , > > but I still want to manipulate the result as an tree , what is the > > convinient way for me to convert the following string to an tree > > object,can someone give me some suggestion? > > > > (NP (DT The) (JJS strongest) (NN rain)) > > Otherwise, you may google for ruby sexp parse, and select one of the > sexp parsing ruby library, to convert the sexp string into a "rexp", a > ruby expression made of Array, Symbol, and other data atoms. Then you > can process this rexp in ruby like I did in lisp. > > -- > __Pascal Bourguignon__ > > --0016e6d2716fb6d3d004739ff3ff--