0

I tried sample Java program to call each of below Alchemy API for a text file.

  TextGetRankedNamedEntities
  TextGetRankedConcepts
  TextGetRankedKeywords
  TextGetLanguage
  TextGetCategory
  TextGetTextSentiment 
  TextGetTargetedSentiment
  TextGetRelations     
  TextGetCombined     
  TextGetTaxonomy  

Individual results look good. But is there any sample Java application using these APIs? Showing how the XMLs given by AlchemyAPI will be used to deduce a meaningful business insight.

Kaushik Lele
  • 6,439
  • 13
  • 50
  • 76

1 Answers1

0

The Watson Developer Cloud Java SDK supports the AlchemyAPIs and it uses Objects instead of returning the XML so it's pretty easy to integrate with an existing Java application.

For example, the code belows uses the AlchemyVision API to recognize faces in an image.

AlchemyVision service = new AlchemyVision();
service.setApiKey("<api_key>");

File image = new File("obama.jpg");
ImageFaces faces = service.recognizeFaces(image, true);

System.out.println(faces); 
German Attanasio
  • 22,217
  • 7
  • 47
  • 63