Skip to content

machinereading/wisekb-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

35 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

WiseKB Demo System

About

Korean Knowledge Extraction System Demo

Libraries

  • Java 1.8
  • Maven
  • Javascript

Architecture

archi

Component Modules

Format

๋ชจ๋“  ๋ฐ์ดํ„ฐ๋Š” JSON ํ˜•ํƒœ๋กœ ์ œ๊ณต๋ฉ๋‹ˆ๋‹ค.

ํƒ€์ž… ์•ฝ์–ด

  • object(obj), array(arr), string(str), number(num), boolean(bool)

1. input

  • text: (str) ์ž…๋ ฅ ํ…์ŠคํŠธ
  • KV: (bool) Knowledge Validation ๊ธฐ๋Šฅ์˜ ์‚ฌ์šฉ On/Off

Example

{
  "text": "์–ด๋‹ˆ์ŠคํŠธ ํ—ค๋ฐ์›จ์ด๋Š” ๋ฏธ๊ตญ์˜ ์†Œ์„ค๊ฐ€์ด์ž ์ €๋„๋ฆฌ์ŠคํŠธ์ด๋‹ค.",
  "KV": true
}

1. output

  • EL: (obj) ๊ฐœ์ฒด ์ˆ˜์ค€ ์ถ”์ถœ ์ •๋ณด
    • sentence: (arr(obj)) ๋ฌธ์žฅ๋“ค ์ •๋ณด
      • text: (str) ์›๋ฌธ ํ…์ŠคํŠธ ํ•œ ๋ฌธ์žฅ
      • ELU: (obj) ๊ฐœ์ฑ„ ์ถ”์ถœ ์ •๋ณด
        • entities: (arr(obj)) Entity Linking ๊ฒฐ๊ณผ
          • text: (str) ๊ฐœ์ฒด ํ‘œ๋ฉดํ˜•
          • en_entity: (str) ๊ฐœ์ฒด ์˜์–ด๋ช…
          • start_offset: (num) ๊ฐœ์ฒด ๋ฌธ์žฅ ๋‚ด ์‹œ์ž‘ ์œ„์น˜
          • end_offset: (num) ๊ฐœ์ฒด ๋ฌธ์žฅ ๋‚ด ๋ ์œ„์น˜
          • ne_type: (str) ETRI ๊ฐœ์ฒด ํƒ€์ž…
          • source: (str) ์ถ”์ถœ ๋ชจ๋“ˆ๋ช…
          • type: (arr(str)) ๊ฐœ์ฒด ํƒ€์ž… ์ •๋ณด
          • uri: (str) ๊ฐœ์ฒด URI ์ •๋ณด
          • predicted_coref_index: (num) ์ƒํ˜ธ ์ฐธ์กฐ ID
          • score: (num) ๊ฐœ์ฒด ์ถ”์ถœ ์ ์ˆ˜
          • confidence: (num) ๊ฐœ์ฒด ์ถ”์ถœ ์‹ ๋ขฐ๋„
        • d_entities: (arr(obj)) dark entity ๊ฒฐ๊ณผ
          • text: (str) ๊ฐœ์ฒด ํ‘œ๋ฉดํ˜•
          • type: (str) ETRI ๊ฐœ์ฒด ํƒ€์ž…
          • source: (str) ์ถ”์ถœ ๋ชจ๋“ˆ๋ช…
          • start_offset: (num) ๊ฐœ์ฒด ๋ฌธ์žฅ ๋‚ด ์‹œ์ž‘ ์œ„์น˜
          • end_offset: (num) ๊ฐœ์ฒด ๋ฌธ์žฅ ๋‚ด ๋ ์œ„์น˜
          • uri: (str) ๊ฐœ์ฒด URI ์ •๋ณด
          • score: (num) ๊ฐœ์ฒด ์ถ”์ถœ ์ ์ˆ˜
          • confidence: (num) ๊ฐœ์ฒด ์ถ”์ถœ ์‹ ๋ขฐ๋„
          • indirect: (num) (deprecated)
          • link: (num) ๊ฐœ์ฒด ์—ฐ๊ฒฐ
          • relation: (num) (deprecated)
          • sen_id: (num) ๋ฌธ์žฅ ID
          • ne_id: (num) ๊ฐœ์ฒด ID
        • merge: arr(obj) ๋ฐ๋ชจ๋ฅผ ์œ„ํ•œ entities + d_entities ๋ณ‘ํ•ฉ ์ •๋ณด
    • text: (str) ์ž…๋ ฅ ์›๋ณธ ๋ฌธ์žฅ
  • PL: (obj) ๊ด€๊ณ„ ์ˆ˜์ค€ ์ถ”์ถœ ์ •๋ณด
    • triples: (arr(obj)) ํŠธ๋ฆฌํ”Œ๋“ค
      • s: (str) ํŠธ๋ฆฌํ”Œ Sbject ๊ฐœ์ฒด
      • p: (str) ํŠธ๋ฆฌํ”Œ ๊ด€๊ณ„๋ช…
      • o: (str) ํŠธ๋ฆฌํ”Œ Object ๊ฐœ์ฒด
      • src: (str) ์ถ”์ถœ ๋ชจ๋“ˆ๋ช…
      • sco: (num) ์ถ”์ถœ ๋ชจ๋“ˆ ์ ์ˆ˜
      • stc: (str) ์ถ”์ถœ ๋Œ€์ƒ ๋ฌธ์žฅ
    • graph: (obj) ๋ฐ๋ชจ ๊ทธ๋ž˜ํ”„์šฉ ์ •๋ณด
      • nodes: (arr(obj)) ๋ฐ๋ชจ ๊ทธ๋ž˜ํ”„ ๋…ธ๋“œ ์ •๋ณด
      • name: (str) ๋ฐ๋ชจ ๊ทธ๋ž˜ํ”„ ๋…ธ๋“œ ์ด๋ฆ„
      • label: (str) ๋ฐ๋ชจ ๊ทธ๋ž˜ํ”„ ๋…ธ๋“œ ๋ ˆ์ด๋ธ”
      • id: (num) ๋ฐ๋ชจ ๊ทธ๋ž˜ํ”„ ๋…ธ๋“œ ID
    • links: (arr(obj)) ๋ฐ๋ชจ ๊ทธ๋ž˜ํ”„ ๋งํฌ ์ •๋ณด
      • rel: (str) ๊ด€๊ณ„๋ช…
      • sumz: (bool) ์š”์•ฝ ๋Œ€์ƒ ์œ /๋ฌด
      • source: (num) ๊ทธ๋ž˜ํ”„ ํ—ค๋“œ ๋…ธ๋“œ
      • type: (str) ๊ด€๊ณ„๋ช…:์ถ”์ถœ์ ์ˆ˜
      • target: (num) ๊ทธ๋ž˜ํ”„ ํ…Œ์ผ ๋…ธ๋“œ
    • ABS_NLG: (str) (deprecated)
    • EXT_NLG: (str) (deprecated)

Example

{
    "EL": {
        "sentence": [
            {
                "text": "์–ด๋‹ˆ์ŠคํŠธ ํ—ค๋ฐ์›จ์ด๋Š” ๋ฏธ๊ตญ์˜ ์†Œ์„ค๊ฐ€์ด์ž ์ €๋„๋ฆฌ์ŠคํŠธ์ด๋‹ค.",
                "ELU": {
                    "entities": [
                        {
                            "score": 0.4626169800758362,
                            "confidence": 0.4987819194793701,
                            "en_entity": "Ernest_Hemingway",
                            "end_offset": 9,
                            "predicted_coref_index": -1,
                            "ne_type": "PS_NAME",
                            "text": "์–ด๋‹ˆ์ŠคํŠธ ํ—ค๋ฐ์›จ์ด",
                            "start_offset": 0,
                            "source": "ELU",
                            "type": [
                                "http://wikidata.dbpedia.org/resource/Q215627",
                                "http://www.wikidata.org/entity/Q215627",
                                "http://dbpedia.org/ontology/Artist",
                                "http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#Agent",
                                "http://dbpedia.org/ontology/Agent",
                                "http://www.wikidata.org/entity/Q5",
                                "http://schema.org/Person",
                                "http://wikidata.dbpedia.org/resource/Q5",
                                "http://www.w3.org/2002/07/owl#Thing",
                                "http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#NaturalPerson",
                                "http://dbpedia.org/ontology/Person",
                                "http://www.wikidata.org/entity/Q24229398",
                                "http://xmlns.com/foaf/0.1/Person",
                                "http://dbpedia.org/ontology/Writer",
                                "http://www.wikidata.org/entity/Q36180"
                            ],
                            "uri": "http://kbox.kaist.ac.kr/resource/์–ด๋‹ˆ์ŠคํŠธ_ํ—ค๋ฐ์›จ์ด"
                        },
                        {
                            "score": 0.4748806059360504,
                            "confidence": 0.46671003103256226,
                            "en_entity": "United_States",
                            "end_offset": 13,
                            "predicted_coref_index": -1,
                            "ne_type": "LCP_COUNTRY",
                            "text": "๋ฏธ๊ตญ",
                            "start_offset": 11,
                            "source": "ELU",
                            "type": [
                                "http://dbpedia.org/ontology/Place",
                                "http://www.ontologydesignpatterns.org/ont/d0.owl#Location",
                                "http://schema.org/Country",
                                "http://schema.org/Place",
                                "http://dbpedia.org/ontology/Wikidata:Q532",
                                "http://dbpedia.org/ontology/PopulatedPlace",
                                "http://dbpedia.org/ontology/Country"
                            ],
                            "uri": "http://kbox.kaist.ac.kr/resource/๋ฏธ๊ตญ"
                        },
                        {
                            "score": 0.4756163954734802,
                            "confidence": 0.5063678026199341,
                            "en_entity": "Novelist",
                            "end_offset": 18,
                            "predicted_coref_index": -1,
                            "ne_type": "CV_OCCUPATION",
                            "text": "์†Œ์„ค๊ฐ€",
                            "start_offset": 15,
                            "source": "ELU",
                            "type": [
                                "http://dbpedia.org/ontology/Profession",
                                "http://dbpedia.org/ontology/PersonFunction"
                            ],
                            "uri": "http://kbox.kaist.ac.kr/resource/์†Œ์„ค๊ฐ€"
                        },
                        {
                            "score": 0.47593772411346436,
                            "confidence": 0.49228110909461975,
                            "en_entity": "Journalist",
                            "end_offset": 26,
                            "predicted_coref_index": -1,
                            "ne_type": "CV_OCCUPATION",
                            "text": "์ €๋„๋ฆฌ์ŠคํŠธ",
                            "start_offset": 21,
                            "source": "ELU",
                            "type": [
                                "http://dbpedia.org/ontology/Profession",
                                "http://dbpedia.org/ontology/PersonFunction"
                            ],
                            "uri": "http://kbox.kaist.ac.kr/resource/์ €๋„๋ฆฌ์ŠคํŠธ"
                        }
                    ],
                    "d_entities": [],
                    "merge": [
                        {
                            "score": 0.4626169800758362,
                            "confidence": 0.4987819194793701,
                            "en_entity": "Ernest_Hemingway",
                            "end_offset": 9,
                            "predicted_coref_index": -1,
                            "ne_type": "PS_NAME",
                            "text": "์–ด๋‹ˆ์ŠคํŠธ ํ—ค๋ฐ์›จ์ด",
                            "start_offset": 0,
                            "source": "ELU",
                            "type": [
                                "http://wikidata.dbpedia.org/resource/Q215627",
                                "http://www.wikidata.org/entity/Q215627",
                                "http://dbpedia.org/ontology/Artist",
                                "http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#Agent",
                                "http://dbpedia.org/ontology/Agent",
                                "http://www.wikidata.org/entity/Q5",
                                "http://schema.org/Person",
                                "http://wikidata.dbpedia.org/resource/Q5",
                                "http://www.w3.org/2002/07/owl#Thing",
                                "http://www.ontologydesignpatterns.org/ont/dul/DUL.owl#NaturalPerson",
                                "http://dbpedia.org/ontology/Person",
                                "http://www.wikidata.org/entity/Q24229398",
                                "http://xmlns.com/foaf/0.1/Person",
                                "http://dbpedia.org/ontology/Writer",
                                "http://www.wikidata.org/entity/Q36180"
                            ],
                            "uri": "http://kbox.kaist.ac.kr/resource/์–ด๋‹ˆ์ŠคํŠธ_ํ—ค๋ฐ์›จ์ด"
                        },
                        {
                            "score": 0.4748806059360504,
                            "confidence": 0.46671003103256226,
                            "en_entity": "United_States",
                            "end_offset": 13,
                            "predicted_coref_index": -1,
                            "ne_type": "LCP_COUNTRY",
                            "text": "๋ฏธ๊ตญ",
                            "start_offset": 11,
                            "source": "ELU",
                            "type": [
                                "http://dbpedia.org/ontology/Place",
                                "http://www.ontologydesignpatterns.org/ont/d0.owl#Location",
                                "http://schema.org/Country",
                                "http://schema.org/Place",
                                "http://dbpedia.org/ontology/Wikidata:Q532",
                                "http://dbpedia.org/ontology/PopulatedPlace",
                                "http://dbpedia.org/ontology/Country"
                            ],
                            "uri": "http://kbox.kaist.ac.kr/resource/๋ฏธ๊ตญ"
                        },
                        {
                            "score": 0.4756163954734802,
                            "confidence": 0.5063678026199341,
                            "en_entity": "Novelist",
                            "end_offset": 18,
                            "predicted_coref_index": -1,
                            "ne_type": "CV_OCCUPATION",
                            "text": "์†Œ์„ค๊ฐ€",
                            "start_offset": 15,
                            "source": "ELU",
                            "type": [
                                "http://dbpedia.org/ontology/Profession",
                                "http://dbpedia.org/ontology/PersonFunction"
                            ],
                            "uri": "http://kbox.kaist.ac.kr/resource/์†Œ์„ค๊ฐ€"
                        },
                        {
                            "score": 0.47593772411346436,
                            "confidence": 0.49228110909461975,
                            "en_entity": "Journalist",
                            "end_offset": 26,
                            "predicted_coref_index": -1,
                            "ne_type": "CV_OCCUPATION",
                            "text": "์ €๋„๋ฆฌ์ŠคํŠธ",
                            "start_offset": 21,
                            "source": "ELU",
                            "type": [
                                "http://dbpedia.org/ontology/Profession",
                                "http://dbpedia.org/ontology/PersonFunction"
                            ],
                            "uri": "http://kbox.kaist.ac.kr/resource/์ €๋„๋ฆฌ์ŠคํŠธ"
                        }
                    ]
                }
            }
        ],
        "text": "์–ด๋‹ˆ์ŠคํŠธ ํ—ค๋ฐ์›จ์ด๋Š” ๋ฏธ๊ตญ์˜ ์†Œ์„ค๊ฐ€์ด์ž ์ €๋„๋ฆฌ์ŠคํŠธ์ด๋‹ค."
    },
    "PL": {
        "triples": [
            {
                "p": "occupation",
                "s": "์–ด๋‹ˆ์ŠคํŠธ_ํ—ค๋ฐ์›จ์ด/Ernest_Hemingway",
                "stc": "<e1>์–ด๋‹ˆ์ŠคํŠธ_ํ—ค๋ฐ์›จ์ด</e1> ๋Š” ๋ฏธ๊ตญ ์˜ <e2>์†Œ์„ค๊ฐ€</e2> ์ด์ž ์ €๋„๋ฆฌ์ŠคํŠธ ์ด๋‹ค.",
                "src": "BERT",
                "sco": 0.99187875,
                "o": "์†Œ์„ค๊ฐ€/Novelist"
            },
            {
                "p": "occupation",
                "s": "์–ด๋‹ˆ์ŠคํŠธ_ํ—ค๋ฐ์›จ์ด/Ernest_Hemingway",
                "stc": "<e1>์–ด๋‹ˆ์ŠคํŠธ_ํ—ค๋ฐ์›จ์ด</e1> ๋Š” ๋ฏธ๊ตญ ์˜ ์†Œ์„ค๊ฐ€ ์ด์ž <e2>์ €๋„๋ฆฌ์ŠคํŠธ</e2> ์ด๋‹ค.",
                "src": "BERT",
                "sco": 0.98237854,
                "o": "์ €๋„๋ฆฌ์ŠคํŠธ/Journalist"
            },
            {
                "p": "nationality",
                "s": "์–ด๋‹ˆ์ŠคํŠธ_ํ—ค๋ฐ์›จ์ด/Ernest_Hemingway",
                "stc": "<e1>์–ด๋‹ˆ์ŠคํŠธ_ํ—ค๋ฐ์›จ์ด</e1> ๋Š” <e2>๋ฏธ๊ตญ</e2> ์˜ ์†Œ์„ค๊ฐ€ ์ด์ž ์ €๋„๋ฆฌ์ŠคํŠธ ์ด๋‹ค.",
                "src": "BERT",
                "sco": 0.71771085,
                "o": "๋ฏธ๊ตญ/United_States"
            }
        ],
        "graph": {
            "nodes": [
                {
                    "name": "์–ด๋‹ˆ์ŠคํŠธ_ํ—ค๋ฐ์›จ์ด",
                    "label": "Ernest_Hemingway",
                    "id": 1
                },
                {
                    "name": "์†Œ์„ค๊ฐ€",
                    "label": "Novelist",
                    "id": 2
                },
                {
                    "name": "์•„์ด๋‹คํ˜ธ_์ฃผ",
                    "label": "Idaho",
                    "id": 3
                },
                {
                    "name": "๋ฌด๊ธฐ์—ฌ_์ž˜_์žˆ๊ฑฐ๋ผ",
                    "label": "A_Farewell_to_Arms",
                    "id": 4
                },
                {
                    "name": "๋…ธ์ธ๊ณผ_๋ฐ”๋‹ค",
                    "label": "The_Old_Man_and_the_Sea",
                    "id": 5
                },
                {
                    "name": "๋…ธ๋ฒจ๋ฌธํ•™์ƒ",
                    "label": "",
                    "id": 6
                },
                {
                    "name": "ํ“ฐ๋ฆฌ์ฒ˜์ƒ_ํ”ฝ์…˜_๋ถ€๋ฌธ",
                    "label": "Pulitzer_Prize_for_Fiction",
                    "id": 7
                },
                {
                    "name": "ํ“ฐ๋ฆฌ์ฒ˜์ƒ",
                    "label": "Pulitzer_Prize",
                    "id": 8
                },
                {
                    "name": "๋ฏธ๊ตญ",
                    "label": "United_States",
                    "id": 9
                },
                {
                    "name": "์˜คํฌํŒŒํฌ_(์ผ๋ฆฌ๋…ธ์ด_์ฃผ)",
                    "label": "Oak_Park,_Illinois",
                    "id": 10
                },
                {
                    "name": "๋ˆ„๊ตฌ๋ฅผ_์œ„ํ•˜์—ฌ_์ข…์€_์šธ๋ฆฌ๋‚˜",
                    "label": "For_Whom_the_Bell_Tolls",
                    "id": 11
                },
                {
                    "name": "์ผ๋ฆฌ๋…ธ์ด์ฃผ",
                    "label": "",
                    "id": 12
                },
                {
                    "name": "๋…ธ๋ฒจ_๋ฌธํ•™์ƒ",
                    "label": "Nobel_Prize_in_Literature",
                    "id": 13
                },
                {
                    "name": "์ €๋„๋ฆฌ์ŠคํŠธ",
                    "label": "Journalist",
                    "id": 14
                }
            ],
            "links": [
                {
                    "rel": "1_occupation",
                    "sumz": false,
                    "source": 1,
                    "type": "occupation:0.99",
                    "target": 2
                },
                {
                    "rel": "2_occupation",
                    "sumz": false,
                    "source": 1,
                    "type": "occupation:0.98",
                    "target": 14
                },
                {
                    "rel": "3_occupation",
                    "sumz": false,
                    "source": 2,
                    "type": "occupation:0.98",
                    "target": 14
                },
                {
                    "rel": "4_occupation",
                    "sumz": false,
                    "source": 9,
                    "type": "occupation:0.92",
                    "target": 2
                },
                {
                    "rel": "5_nationality",
                    "sumz": false,
                    "source": 1,
                    "type": "nationality:0.72",
                    "target": 9
                },
                {
                    "rel": "6_occupation",
                    "sumz": false,
                    "source": 9,
                    "type": "occupation:0.27",
                    "target": 14
                }
            ]
        },
        "ABS_NLG": "",
        "EXT_NLG": ""
    }
}

Licenses

Publisher

Machine Reading Lab @ KAIST

Acknowledgement

This work was supported by Institute for Information & communications Technology Promotion(IITP) grant funded by the Korea government(MSIT) (2013-0-00109, WiseKB: Big data based self-evolving knowledge base and reasoning platform)

Citation

Nam, Sangha, et al. "A Korean Knowledge Extraction System for Enriching a KBox." Proceedings of the 27th International Conference on Computational Linguistics: System Demonstrations. 2018.

About

Korean Knowledge Extraction System Demo

Resources

Stars

2 stars

Watchers

6 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages