Re: [R] extracting text from wordnet using synonym()

2009-08-15 Thread Kelvin Lam
Thank you both! It works now. (Need to check out the parsing ) Gabor Grothendieck wrote: > > Or a variation: > >> unlist(lapply(parse(text = Str), eval)) > [1] "aid""assist" "assistance" "help" "aid" > [6] "assistance" "help" > > On Sat, Aug 15, 2009 at 5:55 PM, Henri

Re: [R] extracting text from wordnet using synonym()

2009-08-15 Thread Gabor Grothendieck
Or a variation: > unlist(lapply(parse(text = Str), eval)) [1] "aid""assist" "assistance" "help" "aid" [6] "assistance" "help" On Sat, Aug 15, 2009 at 5:55 PM, Henrique Dallazuanna wrote: > Try this: > > Str <- c("c(\"aid\", \"assist\", \"assistance\", \"help\")", >         "c(\"

Re: [R] extracting text from wordnet using synonym()

2009-08-15 Thread Henrique Dallazuanna
Try this: Str <- c("c(\"aid\", \"assist\", \"assistance\", \"help\")", "c(\"aid\", \"assistance\", \"help\")") unlist(sapply(Str, function(x)dget(textConnection(x)), USE.NAMES = FALSE)) On Sat, Aug 15, 2009 at 6:33 PM, Kelvin Lam wrote: > > Dear group, > > There are postings on extract

[R] extracting text from wordnet using synonym()

2009-08-15 Thread Kelvin Lam
Dear group, There are postings on extracting partial string using sub()/gsub()/gsubfn() but I still couldn't figure this one out. Supposed I am pulling the synonyms of "help" using synonyms("help") from wordnet and get the followings: > synonyms("help") [1] "c(\"aid\", \"assist\", \"assistance\