the power of semantic technologies to explore linked open data

51
The Power of Semantic Technologies to Explore Linked Open Data Graphorum & Smart Data Conference, Jan 2017

Upload: ontotext

Post on 07-Apr-2017

61 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: The Power of Semantic Technologies to Explore Linked Open Data

The Power of Semantic Technologies

to Explore Linked Open Data

Graphorum & Smart Data Conference, Jan 2017

Page 2: The Power of Semantic Technologies to Explore Linked Open Data

You will learn how to:• Convert tabular data into RDF

• Combine local and remote data in a single query

• Graphically explore the connectivity patterns in big diverse data− 1B+ triples, 1000+ classes, 8 datasets

• Detect suspicious patterns of company control

• Filter news based on relationships between companies and people

• Rank companies per industry and region

Page 3: The Power of Semantic Technologies to Explore Linked Open Data

Presentation Outline• Use cases: Relation discovery and Media monitoring• GraphDB’s OntoRefine conversion of tabular data in RDF• FactForge: Open data and news about people and organizations• Relationship Discovery Examples• Media Monitoring Examples & Popularity Ranking• Panama Papers and Global Legal Entity Identifier as Open Data• Tracing Panama Papers entities in the news

Page 4: The Power of Semantic Technologies to Explore Linked Open Data

Use cases: Relation discoveryand Media monitoring

Page 5: The Power of Semantic Technologies to Explore Linked Open Data

Commercial Company Database (e.g. D&B)

Link data!Reveal more!

Social Media

News

Wikipedia

Private• Link diverse data in a

Knowledge Graph

• Analyze News and Social Content

• Extract facts and link content to data

• Interpret data in context of big linked data

Page 6: The Power of Semantic Technologies to Explore Linked Open Data

Content Analytics & Exploration Platform

GraphDB Linked Open Data

Page 7: The Power of Semantic Technologies to Explore Linked Open Data

Relation Discovery Case

• Find suspicious relationships like:− Company in USA− Controls another

company in USA− Through a company in

an off-shore zone

• Show news relevant to these companies

Page 8: The Power of Semantic Technologies to Explore Linked Open Data

Linking News to Big Knowledge Graphs• The DSP platform

links text to knowledge graphs

• One can navigate from news to concepts, entities and topics, and from there to other news

Try it at http://now.ontotext.com

Page 9: The Power of Semantic Technologies to Explore Linked Open Data

Semantic Media MonitoringFor each entity: •popularity trends•relevant news•related entities•knowledge graph information

Try it at http://now.ontotext.com

Page 10: The Power of Semantic Technologies to Explore Linked Open Data

GraphDB OntoRefine: conversion of tabular data in RDF

Page 11: The Power of Semantic Technologies to Explore Linked Open Data

OntoRefine: Data Transformation to RDF• Based on OpenRefine and integrated in the GraphDB Workbench

• Allows converting tabular data into RDF− Supported formats are TSV, CSV, *SV, XLS, XLSX, JSON, XML, RDF as XML, and Google sheet

− Easily filter your data, edit its inconsistencies

− View the cleaned data as RDF

• Exposes a GraphDB SPARQL endpoint− Transform your data using SPIN functions− Import your data straight into a GraphDB repository

The Power of Semantic Technologies to Explore Linked Open Data Jan 2017 #11

Page 12: The Power of Semantic Technologies to Explore Linked Open Data

OntoRefine: Uploading data• Create new project

− From local / remote files▪ Supported formats are TSV, CSV,

*SV, XLS, XLSX, JSON, XML, RDF as XML, and Google sheet

▪ With the first opening of the file, OntoRefine tries to recognize the encoding of the text file and all delimiters.

▪ Allows further fine-tuning of the table configurations

− From clipboard

• Open / import a project

The Power of Semantic Technologies to Explore Linked Open Data Jan 2017 #12

Page 13: The Power of Semantic Technologies to Explore Linked Open Data

OntoRefine: Viewing tabular data as RDF• OpenRefine supports RDF as input only

• OntoRefine also supports RDF as output

The Power of Semantic Technologies to Explore Linked Open Data Jan 2017 #13

•Data shown as either records or rows− A record combines multiple rows identifying the same

object and sharing the first column

•Data stored in a separate repository− must not be mistaken with the current repository available

through GraphDB Workbench SPARQL tab

Page 14: The Power of Semantic Technologies to Explore Linked Open Data

OntoRefine: RDF-izing data• Transform data using a CONSTRUCT query

− in the OntoRefine SPARQL endpoint − directly in the GraphDB SPARQL endpoint

• GraphDB 8.O supports SPIN functions:− SPARQL functions for splitting a string− SPARQL functions for parsing dates− SPARQL functions for encoding URIs

The Power of Semantic Technologies to Explore Linked Open Data Jan 2017 #14

Page 15: The Power of Semantic Technologies to Explore Linked Open Data

OntoRefine: Importing data in GraphDB

• After transforming the data, import it in the current repository without leaving the GraphDB Workbench− Copy the endpoint of the OntoRefine project− Go to GraphDB SPARQL menu− Execute a query to import the results

The Power of Semantic Technologies to Explore Linked Open Data Jan 2017 #15

Page 17: The Power of Semantic Technologies to Explore Linked Open Data

Federation example: GDP per Sq. Km.

SELECT DISTINCT ?name (STR(?area) AS ?areaSqKm) (STR(?GDPperKm) AS ?GDPperSqKm)

{ ?gdp2015prop gdp:forYear 2015 . ?country gdp:gdpCountry_Name ?name ; ?gdp2015prop ?gdp2015 .

{ SELECT (STR(?n) as ?name) ?area { SERVICE <http://dbpedia.org/sparql> { ?c a dbo:Country ; rdfs:label ?n; dbp:areaKm ?area . } } } BIND(STR(ROUND(xsd:decimal(?gdp2015/1000000000))) AS ?gdp2015bil) BIND(xsd:integer((?gdp2015) / ?area ) AS ?GDPperKm)} ORDER BY DESC(?GDPperKm) LIMIT 10

Page 18: The Power of Semantic Technologies to Explore Linked Open Data

FactForge: Open data and news about people and organizations

http://factforge.net

Page 19: The Power of Semantic Technologies to Explore Linked Open Data

Our approach to Big Data1. Integrate data from many sources

− Build a Big Knowledge Graph that integrates relevant data from proprietary databases and taxonomies plus millions of facts of Linked Data

2. Infer new facts and unveil relationships− Performing reasoning across different data sources

3. Interlink text and with big data− Using text-mining to automatically discover references to

concepts and entities

4. Use graph database for metadata management, querying and search

Page 20: The Power of Semantic Technologies to Explore Linked Open Data

FactForge: Data Integration

DBpedia (the English version) 496M

Geonames (all geographic features on Earth) 150Mowl:sameAs links between DBpedia and Geonames 471K

Company registry data (GLEI) 3M

Panama Papers DB (#LinkedLeaks) 20M

Other datasets and ontologies: WordNet, WorldFacts, FIBO

News metadata (2000 articles/day enriched by NOW) 473M

Total size (1152M explicit + 322M inferred statements) 1 475М

Page 21: The Power of Semantic Technologies to Explore Linked Open Data

News Metadata

• Metadata from Ontotext’s Dynamic Semantic Publishing platform− News stream from Google − Automatically generated as part of the NOW.ontotext.com semantic news showcase

• News stream from Google since Feb 2015, about 50k news/month− ~70 tags (annotations) per news article

• Tags link text mentions of concepts to the knowledge graph− Technically these are URIs for entities (people, organizations, locations, etc.) and key phrases

Page 22: The Power of Semantic Technologies to Explore Linked Open Data

New Metadata

Category Count International 52 074Science and Technology 23 201Sports 20 714Business 15 155Lifestyle 11 684

122 828

Mentions / entity type Count Keyphrase 2 589 676Organization 1 276 441Location 1 260 972Person 1 248 784Work 309 093Event 258 388RelationPersonRole 236 638Species 180 946

News Metadata

Page 23: The Power of Semantic Technologies to Explore Linked Open Data

Class Hierarchy Map (by number of instances)Left: The big pictureRight: dbo:Agent class (2.7M organizations and persons)

Page 24: The Power of Semantic Technologies to Explore Linked Open Data

Sample queries at http://factforge.net

• F1: Big cities in Eastern Europe

• F2: Airports near London

• F3: People and organizations related to Google

• F4: Top-level industries by number of companies

Available as Saved Queries at http://factforge.net/sparql

Note: Open Saved Queries with the folder icon in the upper-right corner

Page 25: The Power of Semantic Technologies to Explore Linked Open Data

Relationship Discovery Examples

Page 26: The Power of Semantic Technologies to Explore Linked Open Data

Offshore control example• Query: Find companies, which control other companies in the same

country, through company in an off-shore zone

• How it works:• Establish control-relationship• Establish a company-country mapping • Establish an “off-shore criteria”• SPARQL it

Page 27: The Power of Semantic Technologies to Explore Linked Open Data

Off-shore company control exampleSELECT *FROM onto:disable-sameAsWHERE { ?c1 fibo-fnd-rel-rel:controls ?c2 . ?c2 fibo-fnd-rel-rel:controls ?c3 . ?c1 ff-map:orgCountry ?c1_country . ?c2 ff-map:orgCountry ?c2_country . ?c3 ff-map:orgCountry ?c1_country .

FILTER (?c1_country != ?c2_country) ?c2_country ff-map:hasOffshoreProvisions true .}

Page 28: The Power of Semantic Technologies to Explore Linked Open Data

Media Monitoring Examples

Page 29: The Power of Semantic Technologies to Explore Linked Open Data

Semantic Media Monitoring/Press-Clipping

• We can trace references to a specific company in the news− This is pretty much standard, however we can deal with syntactic variations in the names,

because state of the art Named Entity Recognition technology is used− What’s more important, we distinguish correctly in which mention “Paris” refers to which of the

following: Paris (the capital of France), Paris in Texas, Paris Hilton or to Paris (the Greek hero)

• We can trace and consolidate references to daughter companies

• We have comprehensive industry classification− The one from DBPedia, but refined to accommodate identifier variations and specialization (e.g.

company classified as dbr:Bank will also be considered classified as dbr:FinancialServices)

Page 30: The Power of Semantic Technologies to Explore Linked Open Data

Media Monitoring Queries• F5: Mentions in the news of an organization and its related entities

• F7: Most popular companies per industry, including children

• F8: Regional exposition of company – normalized

http://ff-news.ontotext.com/sparql?name=Orgs+by+number+of+children&infer=true&sameAs=false&query=#+F5:+Mentions+in+the+news+of+an+organization+and+its+related+entities%0A%23+-+retrieves+people+related+to+a+given+organization+with+any+relation+;%0A%23+++this+would+be+slow+if+predicate+indices+are+not+switched+on%0A%23+-+retrieves+related+organizations+using+ff-map:agentRelation+;+%0A%23%20it+generalizes+the+important+relations+between+agents+%0A%23%20(people+and+organizations)+from+DBPedia+++%0A%23+-+the+entity+itself+is+also+added+to+the+set+of+%22related+entities%22%0A%23+++so+that+its+mentions+in+the+news+are+easily+extracted%0A%23+-+uses+news+metadata+imported+continuously+from+http://now.ontotext.com%0A%23+Change+Gazprom+to+any+organization,+e.g.+type+dbr:Berks+and+press+%0A%23+Ctrl-Space+to+auto-complete+and+get+dbr:Berkshire_Hathaway%0A%0APREFIX+dbr:+%3Chttp://dbpedia.org/resource/%3E%0APREFIX+pub-old:+%3Chttp://ontology.ontotext.com/publishing%23%3E%0APREFIX+pub:+%3Chttp://ontology.ontotext.com/taxonomy/%3E%0APREFIX+dbo:+%3Chttp://dbpedia.org/ontology/%3E%0APREFIX+ff-map:+%3Chttp://factforge.net/ff2016-mapping/%3E%0A%0ASELECT+DISTINCT+?news+?title+?date+?related_entity++%0A%7B%0A++++%7B+SELECT+DISTINCT+?related_entity+%7B%0A++++++++BIND+(+dbr:Gazprom+as+?entity+)%0A%0A%20%20%7B%20?related_entity+a+dbo:Person+;+?p+?entity+.%0A+++++++++++++FILTER+NOT+EXISTS+%7B+?related_entity+dbo:club+?entity+.+%7D+%0A++++++++%7D+%20++++++++++++%0A++++++++UNION++++%0A++++++++%7B%20?related_entity+a+dbo:Organisation+;+dbo:parent+?entity+.+%7D+%0A++++++++UNION%0A++++++++%7B+++BIND(?entity+as+?related_entity)+%7D+%0A%20%7D+%7D%0A++++%0A++++?news+pub-old:containsMention+/+pub-old:hasInstance+/+pub:exactMatch+?related_entity+.%0A++++?news+pub-old:creationDate+?date;+pub-old:title+?title+.%0A%7D+%0AORDER+BY+DESC(?date)+LIMIT+1000&execute=
Page 31: The Power of Semantic Technologies to Explore Linked Open Data

News Popularity Ranking: Automotive

Rank Company News # Rank Company incl. mentions of child companies News #

1 General Motors 2722 1 General Motors 46202 Tesla Motors 2346 2 Volkswagen Group 39993 Volkswagen 2299 3 Fiat Chrysler Automobiles 26584 Ford Motor Company 1934 4 Tesla Motors 23705 Toyota 1325 5 Ford Motor Company 21256 Chevrolet 1264 6 Toyota 16567 Chrysler 1054 7 Renault-Nissan Alliance 13328 Fiat Chrysler Automobiles 1011 8 Honda 8649 Audi AG 972 9 BMW 715

10 Honda 717 10 Takata Corporation 547

Page 32: The Power of Semantic Technologies to Explore Linked Open Data

News Popularity: Finance

Rank Company News # Rank Company incl. mentions of controlled News #1 Bloomberg L.P. 3203 1 Intra Bank 2616672 Goldman Sachs 1992 2 Hinduja Bank (Switzerland) 497313 JP Morgan Chase 1712 3 China Merchants Bank 382884 Wells Fargo 1688 4 Alphabet Inc. 226015 Citigroup 1557 5 Capital Group Companies 40766 HSBC Holdings 1546 6 Bloomberg L.P. 36117 Deutsche Bank 1414 7 Exor 27048 Bank of America 1335 8 Nasdaq, Inc. 20829 Barclays 1260 9 JP Morgan Chase 1972

10 UBS 694 10 Sentinel Capital Partners 1053

Note: Including investment funds, stock exchanges, agencies, etc.

Page 33: The Power of Semantic Technologies to Explore Linked Open Data

News Popularity: Banking

Rank Company News # Rank Company incl. mentions of controlled News #1 Goldman Sachs 996 1 China Merchants Bank * 382882 JP Morgan Chase 856 2 JP Morgan Chase 19723 HSBC Holdings 773 3 Goldman Sachs 10304 Deutsche Bank 707 4 HSBC 9665 Barclays 630 5 Bank of America 7716 Citigroup 519 6 Deutsche Bank 7427 Bank of America 445 7 Barclays 6818 Wells Fargo 422 8 Citigroup 6309 UBS 347 9 Wells Fargo 428

10 Chase 126 10 UBS 347

Page 34: The Power of Semantic Technologies to Explore Linked Open Data

Panama Papers and Global Legal Entity Identifier as Open Data

Page 35: The Power of Semantic Technologies to Explore Linked Open Data

Global Legal Entity Identifier (GLEI) data

• Global Markets Entity Identifier (GMEI) Utility data− The Global Markets Entity Identifier (GMEI) utility is DTCC's legal entity identifier solution offered in

collaboration with SWIFT− We downloaded as XML data dump from https://www.gmeiutility.org/

• RDF-ized company records − Fields: LEI#, legal name, ultimate parent, registered country − 3M explicit statements for 211 thousand organizations

▪ For comparison, there are 490 000 organizations in DBPeda and D&B covers above 200 million

− 10,821 ultimate parent relationships and 1632 ultimate parents

• 2 800 organizations from the GLEI dump mapped to DBPedia

Page 36: The Power of Semantic Technologies to Explore Linked Open Data

GLEI Company Data Sample: ABN-AMROlei:businessRegistry Kamer van Koophandel

lei:businessRegistryNumber 34334259

lei:duplicateReference data:549300T5O0D0T4V2ZB28

lei:entityStatus ACTIVE

lei:headquartersCity Amsterdam

lei:headquartersState Noord-Holland

lei:legalForm NAAMLOZE VENNOOTSCHAP

lei:legalName ABN AMRO Bank N.V.

lei:lei BFXS5XCH7N0Y05NIXW11

lei:registeredCity Amsterdam

lei:registeredCountry NL

lei:registeredPostCode 1082 PP

lei:registeredState Noord-Holland

GLEI Company Data Sample: ABN-AMRO

Page 37: The Power of Semantic Technologies to Explore Linked Open Data

Ultimate parent Children Country1 The Goldman Sachs Group, Inc. 1 851 US2 United Technologies Corporation 427 US3 Honeywell International Inc. 341 US4 Morgan Stanley 228 US5 Cargill, Incorporated 217 US6 1832 Asset Management L.P. 202 CA7 Aegon N.V. 174 NL8 Union Bancaire Privée, UBP SA 138 CH9 Citigroup Inc. 135 US

10 State Street Corporation 128 US

Country Companies1 dbr:United_States 103 5482 dbr:Canada 17 4253 dbr:Luxembourg 13 9844 dbr:Sweden 7 9345 dbr:United_Kingdom 7 4216 dbr:Belgium 6 8687 dbr:Ireland 4 7628 dbr:Australia 4 3859 dbr:Germany 3 039

10 dbr:Netherlands 2 561

Global Legal Entity Identifier (GLEI) data

Page 38: The Power of Semantic Technologies to Explore Linked Open Data

Offshore Leaks Database from ICIJ• Published by the International Consortium of Investigative

Journalists (ICIJ) on 9th of May

• A “searchable database” about 320 000 offshore companies− 214 000 extracted from Panama Papers (valid until 2015)

− More than 100 000 from 2013 Offshore leaks investigation (valid until 2010)

• CSV extract from a graph database available for download

• https://offshoreleaks.icij.org/

Page 39: The Power of Semantic Technologies to Explore Linked Open Data

OffshoreLeaks Database

Page 40: The Power of Semantic Technologies to Explore Linked Open Data

Offshore Leaks DB as Linked Open Data

• Ontotext published the Offshore Leaks DB as Linked Open Data

• Available for exploration, querying and download at

http://data.ontotext.com

• ONTOTEXT DISCLAIMERS

We use the data as is provided by ICIJ. We make no representations and warranties of any kind, including warranties of title, accuracy, absence of errors or fitness for particular purpose. All transformations, query results and derivative works are used only to showcase the service and technological capabilities and not to serve as basis for any statements or conclusions.

Page 41: The Power of Semantic Technologies to Explore Linked Open Data

Enrichment and structuring of the data

• Relationship type hierarchy− About 80 types of relationship types in the original dataset got organized in a property hierarchy

• Classification of officers into Person and Company− In the original database there is no way to distinguish whether an officer is a physical person

• Mapping to DBPedia: − 209 countries referred in Offshore Leaks DB are mapped to DBPedia− About 3000 persons and 300 companies mapped to DBPedia

• Overall size of the repository: 22M statements (20M explicit)

Page 42: The Power of Semantic Technologies to Explore Linked Open Data

The RDF-ization Process

• Linked data variant produced without programming− The raw CSV files are RDF-ized using TARQL, http://tarql.github.io/− Data was further interlinked and enriched in GraphDB using SPARQL

• The process is documented in this README file

• All relevant artifacts are open-source, available at

• https://github.com/Ontotext-AD/leaks/

• The entire publishing and mapping took about 15 person-days !!!− Including data.ontotext.com portal setup, promotion, documentation, etc.

Page 44: The Power of Semantic Technologies to Explore Linked Open Data

Mapping Datasets to DBPedia with the GraphDB Lucene Connector

Page 45: The Power of Semantic Technologies to Explore Linked Open Data

Mapping datasets to DBPedia

• The task: map people, organizations and locations to IDs in DBPedia − So that we can analyze the original data with the help of the extra information available in DBPedia

and other datasets that are related to it, e.g. Geonames− For instance, #LinkedLeaks doesn’t contain any extra information about the companies, e.g.

industry sector, controlling or controlled companies, etc.

• Specific conditions: we had to map by names− Other than names, the information about the entities in the source datasets couldn’t help the

mapping▪ Address and country attributes are present, but those appeared to be marginally useful for mapping

− In both cases we mapped locations only in terms of countries and not finer grained locations▪ For this purpose DBPedia geographic data is sufficient and it is also well mapped with GeoNames

Page 46: The Power of Semantic Technologies to Explore Linked Open Data

Mapping datasets to DBPedia (2)

• We used the GraphDB connector to Lucene for these mappings− Using the GraphDB connector, Lucene index was created for Organizations and People from

DBPedia, indexing all sorts of names, descriptions and other textual information for each entity− The mapping process consists mostly of using the name of the entity from the 3rd party dataset

(in this case Panama Papers or GLEI) as a FTS query, embedded in a SPARQL query

• What is that Lucence does better than SPARQL?− When there is little information other than the name, we benefit from the free text indexing of

Lucene, because it deals well with minor syntactic variations and sorts the results by relevance− When mappings 300 000 organizations against another 500 000 organizations, without a key, the

complexity of a SPARQL query is 300 000 x 500 000, which is slower that 300 000 Lucene queries

Page 47: The Power of Semantic Technologies to Explore Linked Open Data

#LinkedLeaks Mapping Queries

• Companies mapped by industry

• Companies mapped in the Finance sector

• Politicians mapped

• Available as Saved Queries at http://factforge.net/sparql

• Note 1: Open Saved Queries with the folder icon in the upper-right corner

Page 48: The Power of Semantic Technologies to Explore Linked Open Data

Tracing Panama Papers entities in the news

Page 49: The Power of Semantic Technologies to Explore Linked Open Data
Page 50: The Power of Semantic Technologies to Explore Linked Open Data

Tracing Panama Papers entities in the news

• After mapping #LinkedLeaks entities to DBPedia identifiers, we can load them, together with the mappings, in the FF-NEWS repository

• This way we have in a single repo, mapped to one another: #LinkedLeaks data, DBPedia, News metadata

• We can make queries like: Give me news mentions of entities which appear in the Panama Papers dataset

• This way the mapping enabled media monitoring at no extra cost

Page 51: The Power of Semantic Technologies to Explore Linked Open Data

Thank you!Experience the technology with NOW: Semantic News Portal

http://now.ontotext.com

and play with open data at

http://factforge.net