Hi Dimitris,

 

Of course… I just called this method:

public String DBPediaSpotLightGetRequest(String conf, String support, String 
type, String text) throws URISyntaxException{

 

              String cont="";

              HttpClient client = new DefaultHttpClient();

              URIBuilder builder = new URIBuilder();

              
builder.setScheme("http").setHost("spotlight.dbpedia.org/rest").setPath("/annotate")

              .setParameter("text", text)

              .setParameter("confidence", conf)

              .setParameter("support", support)

              .setParameter("types", type);

              URI uri = builder.build();

              System.out.println(uri);

              HttpGet httpget = new HttpGet(uri);

              HttpGet request = new HttpGet(httpget.getURI());

              request.addHeader("accept", ACCEPTMETHOD);

              HttpResponse response;

              try {

                     response = client.execute(request);

                     BufferedReader rd = new BufferedReader (new 
InputStreamReader(response.getEntity().getContent()));

                     String line = "";

                     while ((line = rd.readLine()) != null) {

                           cont=cont.concat(line);

                     }

 

 

              } catch (ClientProtocolException e) {

 

                     e.printStackTrace();

              } catch (IOException e) {

 

                     e.printStackTrace();

              }

              return cont;

 

       }

 

What are the rest of parameters? I used text, support, confidence and types… I 
suppose there is something else as well?

 

Thanks,
Srecko

 

 

From: Dimitris Kontokostas [mailto:jimk...@gmail.com] 
Sent: Wednesday, February 27, 2013 21:01
To: Srecko Joksimovic
Cc: dbpedia-discussion@lists.sourceforge.net
Subject: Re: [Dbpedia-discussion] JSON format

 

Hi Srecko,

Can you share from where you retrieved this output?

 

Best,

Dimitris

 

On Wed, Feb 27, 2013 at 4:53 PM, Srecko Joksimovic <sreckojoksimo...@gmail.com> 
wrote:

Hi,

 

Maybe I missed it in literature, but I’d like to know what does 
“similarityScore” and “suppor” mean in output like this?

{

  "@surfaceForm" : "IBM",

  "@URI" : "http://dbpedia.org/resource/IBM";,

  "@offset" : "275",

  "@similarityScore" : "0.11658907681703568",

  "@types" : 
"DBpedia:Company,DBpedia:Organisation,Schema:Organization,Freebase:/business/customer,Freebase:/business,Freebase:/business/brand,Freebase:/computer/programming_language_developer,Freebase:/computer,Freebase:/venture_capital/venture_investor,Freebase:/venture_capital,Freebase:/business/employer,Freebase:/education/educational_institution,Freebase:/education,Freebase:/book/book_subject,Freebase:/book,Freebase:/organization/organization_founder,Freebase:/organization,Freebase:/architecture/architectural_structure_owner,Freebase:/architecture,Freebase:/conferences/conference_sponsor,Freebase:/conferences,Freebase:/business/sponsor,Freebase:/cvg/cvg_publisher,Freebase:/cvg,Freebase:/computer/processor_manufacturer,Freebase:/business/issuer,Freebase:/organization/organization,Freebase:/business/business_operation,Freebase:/internet/website_owner,Freebase:/internet,Freebase:/award/ranked_item,Freebase:/award,Freebase:/computer/operating_system_developer,Freebase:/computer/computer_manufacturer_brand,Freebase:/award/competitor,Freebase:/computer/programming_language_designer,Freebase:/computer/software_developer,Freebase:/award/award_presenting_organization,DBpedia:TopicalConcept",

  "@support" : "4875",

  "@percentageOfSecondRank" : "-1.0"

}

 

Thanks,

Srecko


------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Dbpedia-discussion mailing list
Dbpedia-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion




-- 
Kontokostas Dimitris 

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
Dbpedia-discussion mailing list
Dbpedia-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion

Reply via email to