Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

iptc classification java code example

>>> entities = list(response.entities())
>>> entities.sort(key=lambda x: x.relevance_score, reverse=True)
>>> seen = set()
>>> for entity in entities:
>>>     if entity.id not in seen:
>>>         print entity.id, entity.relevance_score, entity.confidence_score, entity.freebase_types
>>>         seen.add(entity.id)

Debt 0.720049 1.53685 ['/media_common/quotation_subject', '/book/book_subject']
Barclays 0.705099 1.77573 []
Bank 0.635486 1.35011 ['/book/book_subject', '/architecture/building_function']
Mervyn King (economist) 0.619704 2.26693 ['/people/person', '/government/politician', '/business/board_member']
Bill (proposed law) 0.619034 1.03724 ['/tv/tv_subject']
Chancellor of the Exchequer 0.607768 0.952038 ['/government/government_office_or_title']
David Cameron 0.5875 4.18796 ['/people/person', '/film/actor', '/government/politician', '/tv/tv_actor', '/film/person_or_entity_appearing_in_film']
Risk 0.563535 0.98141 ['/media_common/quotation_subject', '/book/book_subject']
Citigroup 0.444129 3.39143 ['/business/employer', '/venture_capital/venture_investor', '/business/sponsor', '/award/ranked_item', '/business/issuer', '/business/business_operation', '/organization/organization', '/business/board_member', '/organization/organization_partnership']
Libor 0.436299 2.08194 []
        			
Source by www.textrazor.com #
 
PREVIOUS NEXT
Tagged: #iptc #classification #java #code
ADD COMMENT
Topic
Name
9+4 =