[R] Using open calais in R

Duncan Temple Lang duncan at wald.ucdavis.edu
Tue Jan 25 15:58:55 CET 2011


fayazvf wrote:
> 
> I am using calais api in R for text analysis.
> But im facing a some problem when fetching the rdf from the server.
> I'm using the getToHost() method for the api call but i get just a null
> string.

You haven't told us nearly enough for us to be able to reproduce
what you are doing.  Where and how is the R function getToHost() ?
is it in an R package?

> The same url in browser returns an RDF document. 
> 
> >getToHost("www.api.opencalais.com",/enlighten/rest/?licenseID=dkzdggsre232ur97c6be269g&content=Home&paramsXML=")
> >[1] ""
> "http://api.opencalais.com/enlighten/rest/?licenseID=dkzdggsre232ur97c6be269g&content=Home&paramsXML="

Yes, and 
  library(RCurl)
  getURLContent("http://api.opencalais.com/enlighten/rest/?licenseID=dkzdggsre232ur97c6be269g&content=Home&paramsXML=")
returns  RDF content
as does
 download.file("http://api.opencalais.com/enlighten/rest/?licenseID=dkzdggsre232ur97c6be269g&content=Home&paramsXML=",
                "eg.txt")

But since we have no way of knowing what getToHost() does (or the postToHost() in your earlier mail),
we cannot figure out what is happening for you.

Please do read the posting guidelines, specifically telling us about your session and
what packages you are using.

  D.


> -- 
> View this message in context: http://r.789695.n4.nabble.com/Using-open-calais-in-R-tp3235597p3235597.html
> Sent from the R help mailing list archive at Nabble.com.
> 
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.

-- 
"There are men who can think no deeper than a fact" - Voltaire


Duncan Temple Lang                duncan at wald.ucdavis.edu
Department of Statistics          work:  (530) 752-4782
4210 Mathematical Sciences Bldg.  fax:   (530) 752-7099
One Shields Ave.
University of California at Davis
Davis, CA 95616, USA



-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20110125/4d2c97a9/attachment.bin>


More information about the R-help mailing list