iptc classification java code example

Solutions on MaxInterview for iptc classification java code example by the best coders in the world

showing results for - "iptc classification java code example"
Alberto
07 Nov 2016
1>>> response = client.analyze_url("http://www.bbc.co.uk/news/uk-politics-18640916")
Amy
11 Jul 2020
1>>> entities = list(response.entities())
2>>> entities.sort(key=lambda x: x.relevance_score, reverse=True)
3>>> seen = set()
4>>> for entity in entities:
5>>>     if entity.id not in seen:
6>>>         print entity.id, entity.relevance_score, entity.confidence_score, entity.freebase_types
7>>>         seen.add(entity.id)
8
9Debt 0.720049 1.53685 ['/media_common/quotation_subject', '/book/book_subject']
10Barclays 0.705099 1.77573 []
11Bank 0.635486 1.35011 ['/book/book_subject', '/architecture/building_function']
12Mervyn King (economist) 0.619704 2.26693 ['/people/person', '/government/politician', '/business/board_member']
13Bill (proposed law) 0.619034 1.03724 ['/tv/tv_subject']
14Chancellor of the Exchequer 0.607768 0.952038 ['/government/government_office_or_title']
15David Cameron 0.5875 4.18796 ['/people/person', '/film/actor', '/government/politician', '/tv/tv_actor', '/film/person_or_entity_appearing_in_film']
16Risk 0.563535 0.98141 ['/media_common/quotation_subject', '/book/book_subject']
17Citigroup 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']
18Libor 0.436299 2.08194 []
19        			
Daniel
04 Oct 2016
1>>> client.set_classifiers(["textrazor_newscodes"])
Hugo
01 Jan 2021
1>>> import textrazor
2>>> textrazor.api_key = "API_KEY_GOES_HERE"
3>>>
4>>> client = textrazor.TextRazor(extractors=["entities", "topics"])
Logan
02 Jan 2020
1>>> for category in response.categories():
2>>> 	print category.category_id, category.label, category.score
3
411000000 politics 0.936274
511006000 politics>government 0.899296
611024000 politics>politics (general) 0.856208
704017000 economy, business and finance>economy (general) 0.772154
808003000 human interest>people 0.661979
912006001 religion and belief>values>ethics 0.650902
1004018000 economy, business and finance>business (general) 0.650722
1114025000 social issue>social issues (general) 0.637389
1204006000 economy, business and finance>financial and business service 0.637093
1314000000 social issue 0.5628
1404006002 economy, business and finance>financial and business service>banking 0.561675
15.....
Allison
08 Jun 2019
1>>> client.set_cleanup_mode("cleanHTML")
Paul
20 Oct 2018
1>>> for topic in response.topics():
2>>> 	if topic.score > 0.3:
3>>> 		print topic.label
4
5Bank
6Libor
7Barclays
8Politics
9Economics
10Government
11Banking
12Business
13Bank of England
14Financial services
15.....