knowledge base ―semantic web and ontology (4...

38
Knowledge Base ―Semantic Web and Ontology (4)― Masaharu Yoshioka

Upload: others

Post on 02-Apr-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Knowledge Base―Semantic Web and Ontology (4)―

Masaharu Yoshioka

Page 2: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Answer of the last lecture question

n Following are list of concepts and roles defined for the question– Concepts

• Female, Male, Human ≡ Male ⊔ Female, Animal– Roles

• has-student, bred-by, eaten-byn Define following concepts using given concepts

and roles.

Page 3: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Answer of the last lecture question (cont)

n Domestic animal(Animal who is bred by human for eating by human)Animal ⊓ $ eaten-by.Human ⊓ $ bred-by.HumanAnimal ⊓ " eaten-by.Human ⊓ $ bred-by.Human

n Teacher(Man who has human student)Human ⊓ $ has-student.Human

n Female teacherFemale ⊓ $ has-student.Human

n Teacher who have only male students– Human ⊓ $ has-student. Male ⊓ " has-student. Male

Page 4: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Comments from the last report

n 男の子だけを持つ父親はどう書きますか?

n Can I interpret that epistemology is an antonym of ontology?

n DL言語などがどのようにコンピュータデー応用されているのでしょうか?

n 私は普通に英語でもOKです。n 日本語で話す割合を増やしてほしい。日本語メインで英語をサブにしてほしい。

n 予習したいので、スライドを早くほしい。

Page 5: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Webオントロジー:背景

n Web2.0– ユーザ参加型の知識構築

• Wikipedia:インターネット上の百科事典• GeoNames:地理情報のデータベース

– 様々なインスタンスに関する大規模な知識源n 基本となる一般的な概念階層知識の構築

– WordNet:英単語に関する概念辞書• 同義語、概念階層などが定義される。

Page 6: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Wikipedia

n 無料のインターネット上の百科事典

n 記事に関連するメタデータはInfoboxに記載– 記事は、複数のカテゴリに分類

Page 7: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

DBpedia

n Wikipedia記事に基づく事物に関する大規模メタデータデータベース

n Dbpediaの品質は、Wikipediaの品質に依存

Page 8: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

DBpediaの持つ情報https://wiki.dbpedia.org/about/facts-figuresn 人・組織・場所などのインスタンスに関する大規模な情報– 458万のものに関する情報– 422万はオントロジー (DBpedia ontology)で分類

• 1,445,000 人物• 735,000 場所

– 478,000 都市など• 411,000 創造物

– 123,000 音楽のアルバム, 87,000 映画 and 19,000 ビデオゲーム

• 241,000 組織– 58,000 会社 and 49,000 教育機関

• 251,000 生物種• 6,000 病気

Page 9: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

DBPediaオントロジーhttp://mappings.dbpedia.org/server/ontology/classes/

n DBpediaに登録されているものを分類するためのオントロージー

Page 10: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

DBpediaのデータ例

n Wikipediaの記事に対応する形で、メタデータをRDFで情報を付加

<http://dbpedia.org/resource/Aristotle> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/2002/07/owl#Thing> .<http://dbpedia.org/resource/Aristotle> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://dbpedia.org/ontology/Person> .

<http://dbpedia.org/resource/Aristotle> <http://dbpedia.org/property/wikiPageUsesTemplate> <http://dbpedia.org/resource/Template:Persondata> .<http://dbpedia.org/resource/Aristotle> <http://dbpedia.org/property/placeOfDeath> "Chalcis"@en .<http://dbpedia.org/resource/Aristotle> <http://dbpedia.org/property/dateOfDeath> "322 BC"@en .<http://dbpedia.org/resource/Aristotle> <http://dbpedia.org/property/placeOfBirth> "Stageira"@en .

Page 11: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Wikidata

n Infoboxでは不十分なメタデータをメタデータのためのデータベースとして扱う。https://www.wikidata.org/wiki/Wikidata:Main_Page

Page 12: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

WordNet

n Princeton大学で開発された英語の概念辞書n 同義語・多義語の表現

– 各単語は、Synsetと呼ばれる意味を表す単位と対応付けることで、多義語を表現

– また、Synsetに複数の単語が属することによって、同義語が表現される

n 意味の階層構造

– Synsetには抽象具体の概念階層と、クラス・インスタンスの関係が存在

n 英語版 http://wordnet.princeton.edu/n 日本語版 http://nlpwww.nict.go.jp/wn-ja/

Page 13: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

WordNetによる概念定義http://wordnetweb.princeton.edu/perl/webwnn WordNet Searchインターフェースによる検索

– “philosopher”の検索結果

Page 14: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

WordNetの統計的情報https://wordnet.princeton.edu/documentation/wnstats7wn

n Version 3.0 (Version 3.1)

n There are several other language version including Japanese version(Wn-Ja 1.1)http://compling.hss.ntu.edu.sg/wnja/– 57,238 synsets; 93,834 words; 158,058 word-sense

pairs– 135,692 Definitions; 48,276 example sentences

POS Unique Synsets Total Strings Word-Sense PairsNoun 117798 82115 146312 Verb 11529 13767 25047 Adjective 21479 18156 30002 Adverb 4481 3621 5580 Totals 155287(175979) 117659 (155327) 206941 (207016)

Page 15: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

WordNetに登録されている語数

n Version 3.0 (Version 3.1)

n 日本語版(Wn-Ja 1.1)http://compling.hss.ntu.edu.sg/wnja/– 57,238 概念 (synsets); 93,834 語; 158,058 語義 (synsetと単語のペア)

– 135,692 定義文; 48,276 例文

POS Unique Synsets Total Strings Word-Sense PairsNoun 117798 82115 146312 Verb 11529 13767 25047 Adjective 21479 18156 30002 Adverb 4481 3621 5580 Totals 155287(175979) 117659 (155327) 206941 (207016)

Page 16: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Open Linked Data

n DBpediaなどのOpenなDataを互いに関連付けることで、より有用な情報として利用可能になる。

n クラスに関するオントロジーではなく、インスタンスに関する知識を整理した大規模オントロジーを構築

Page 17: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Linking Open Data Cloud

“Linking Open Data cloud diagram, by Richard Cyganiak and Anja Jentzsch. http://lod-cloud.net/”

Page 18: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

YAGO:Yet Another Great Ontology

n Wikipedia、WordNet、GeoNamesから自動抽出したインスタンスに関する大規模オントロジー

n WikipediaのカテゴリーとWordNetを用いたクラスの推定

– カテゴリー中の表記を用いて、対応する概念をWordNet中から判定

– どのような情報を用いて、情報を抽出したのかを明記

クラス:PhilosopherAristotleのカテゴリ

Page 19: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

YAGOにおける地理情報の統合

n GeoNames中の同表記の名前で、地理情報の距離が近いものを対応付けることで、地理情報を強化

Page 20: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

YAGOにおける地理情報の統合

n GeoNames:地理情報に関するLinked Open Data

more than 10,000,000geographical entries

19.8millionarticles

large geographical databaseYAGO2(Yet Another Great Ontology2)

Page 21: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

YAGO2における地理情報の統合[Hoffart et.al., 2012]n 名前と緯度経度を用いた情報統合'Burgos' Province in Spainhttp://en.wikipedia.org/wiki/Burgos

'Min River' River in Chinahttp://en.wikipedia.org/wiki/Min_River_(Fujian)

Name matchingCoordinates matching

84,349 corresponding pairs have been found.

Page 22: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

SPARQL Endpoint

n 多くのLinked Open DataはSPARQL Endpointを提供

– DBpediahttp://dbpedia.org/sparql

– DBpedia(Japanese)http://ja.dbpedia.org/sparql

– Wikidatahttps://query.wikidata.org/

– YAGO2https://gate.d5.mpi-inf.mpg.de/webyagospotlx/WebInterface

Page 23: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

SPARQL Endpointの利用例

n DBpedia(Japanese)http://ja.dbpedia.org/sparql– Example

http://ja.dbpedia.org/n YAGO2

https://www.mpi-inf.mpg.de/departments/databases-and-information-systems/research/yago-naga/yago/demo/

Page 24: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

補足資料

n GeoNames とWikipediaの統合の別アプローチ

Page 25: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Integration Method based on Wikipedia Category [Yoshioka et al, 2012]n Wikipedia category for geographical entity

– <class information> (in|of) <location information>e.g., Populated Place In Spain

n GeoNames– Country and administrative code: location information– Feature code: class information

'Burgos' Province in Spainhttp://en.wikipedia.org/wiki/Burgos

Populated Place In Spain -> Populated Place In Burgos

Page 26: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Integration Method based on Wikipedia Category

n Use matching tables between feature code and Wikipedia category class information– Distance is not first priority information to select an

appropriate corresponding entity.

'Narosura' populated place in Kenyahttp://en.wikipedia.org/wiki/Narosura

Distance ○

Page 27: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Algorithms for link discovery

n Comparison of names for candidate pairs

Wikipedia: Rome, IowaCategory: Cities in Iowa Populated places in Henry County, Iowa

GeoNames(id, name (alter name), featureclass, country and administrative code)6459720, Rome, PPL, US:IA:0873169070, Roma (Rome), PPLC, IT:07:RM,….

Page 28: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Algorithms for link discovery 2

n Extraction of information from category

Wikipedia: Rome, IowaCategory: Cities in Iowa Populated places in Henry County, Iowa

Class candidates:City, Populated places →PPL, PPLC, ADM1, …

Location candidates:Iowa → US:IAHenry County, Iowa → US:IA

Page 29: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Algorithms for link discovery 3

n Selection of candidate pair

Wikipedia: Rome, IowaCategory: Cities in Iowa Populated places in Henry County, Iowa

GeoNames(id, name (alter name), featureclass, country and administrative code)○6459720, Rome, PPL, US:IA:087×3169070, Roma (Rome), PPLC, IT:07:RM, ….

Page 30: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Algorithms for link discovery 4

n Elimination of low precision data– 1 to N mapping (It may includes errors)

• Multiple Wikipedia pages for a single GeoNames entry

• Multiple GeoNames entries for a single Wikipedia page

Page 31: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Results of Automatic Integration

n Classify integration results by using distance information– Wikipedia coordinate information is extracted by using

DBpedia and GeoHack

Types of pairs Pages Manual evaluation

Nearby pairs (<= 5km) 26,047 200/200Distant pairs (>5km) 4,333 180/200Pairs with no distance information

14,200 190/200

Page 32: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Inconsistent Geographical Information

n There are several appropriate pairs with long distance.

Type of Inconsistency CasesInconsistent geographic information for appropriate pairs (e.g., large area such as lake, stream,…)

150/200

Errors in Wikipedia and/or GeoNames 30/200Errors due to our link detection method 20/200

Page 33: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Errors in Automatic Integration

n Variations in names– The names of entities might not be represented in

English in GeoNames.

n Failure to estimate the appropriate administrative code– Wikipedia category has administrative information, but

name of the administrative code is different from GeoNames ones.

Page 34: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Errors in Original Data (Wikipedia and DBpedia)n Wikipedia infobox may include errors

– There are several errors for coordinate in Wikipedia• Copy and paste• Difficulties to use template (hidden parameters for

type of longitude (E or W))– DBPedia also contains many errors for coordinate

information• DBPedia assumes coordinates are represented by 3

integers (degrees, minutes and seconds) but there are several coordinate information by using float values.

Page 35: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Errors in Original Data (GeoNames)

n Inappropriate pairs between GeoNames and Wikipedia in original GeoNames database– Failure about disambiguation of entries for different

feature codee.g., Populated place is matched with train station of the city.

Page 36: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Another Issues for Linking Wikipedia and GeoNamesn Different granularity level of the geographical

entity– It is problematic for using owl:SameAs link.

n Wikipedia issues– Geographical entities with multiple points

• Geographical entity about large area may contains multiple points.

• Example: river (source, mouth, …)– Wikipedia pages with multiple geographical entities

• Geographical entity about large area may contains multiple points.

• Example: mountain range pages contained information about several mountains in the range

Page 37: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

Another Issues for Linking Wikipedia and GeoNames (cont.)n GeoNames issues

– Geographical entities with multiple feature classes• A single GeoNames entry corresponds to one

feature class.• Example: “Milolii, Hawaii” has two corresponding

GeoNames entities (5851041: administrative division and 5851402: populated place).

Page 38: Knowledge Base ―Semantic Web and Ontology (4 ...mhjcc3-ei.eng.hokudai.ac.jp/~yoshioka/kb/kby-4-j.pdfComments from the last report n男の子だけを持つ父親はどう書きますか?

まとめ

n Semantic Web– Webページに記述されている意味的な内容を理解するためには、

• オントロジー: 各サイトにおける概念定義を明確にするために必要

• メタデータ付与: メタデータとそのスキーマを理解した形で活用することが必要