Closed GoogleCodeExporter closed 9 years ago
Original comment by elmer.garduno@gmail.com
on 8 Nov 2010 at 4:02
I added it myself, luckily it was pretty easy:
###########################
in CalaisResponse.java:
add new method:
Iterable<CalaisObject> getSocialTags();
#######################
in CalaisRestClient.java:132
add:
final Iterable<CalaisObject> socialTags = Iterables .unmodifiableIterable(hierarchy.get("socialTag"));
#####################
in CalaisRestClient.java:145
add to new CalaisResponse
public Iterable<CalaisObject> getSocialTags() { return socialTags; }
#####################
example useage:
make sure you pass in a CalaisConfig with socialtags enabled:
CalaisConfig config = new CalaisConfig();
config.set(CalaisConfig.ProcessingParam.ENABLE_METADATA_TYPE,
"GenericRelations,SocialTags");
CalaisResponse response = client.analyze(myString,config);
for (CalaisObject tags : response.getSocialTags()){
System.out.println(tags.getField("_typeGroup") + ":" + tags.getField("name"));
}
Original comment by zack...@gmail.com
on 8 Nov 2010 at 9:22
Thank you zack, I have added your changes to the svn trunk.
Original comment by elmer.garduno@gmail.com
on 8 Nov 2010 at 10:02
Released in version 0.2.1
Original comment by elmer.garduno@gmail.com
on 17 May 2011 at 2:51
Original issue reported on code.google.com by
zack...@gmail.com
on 8 Nov 2010 at 8:05