From: pjb@... (Pascal J. Bourguignon) Date: 2009-09-16T00:00:05+09:00 Subject: Re: How to convert an string like this into a tree Object? 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__