180 likes | 195 Views
Learn how to construct and understand queries using question patterns and knowledge graph methods. Explore examples like identifying endangered animals or finding award winners using semantic understanding.
E N D
问句理解示例 瞿裕忠
问句理解 • 问句模式(疑问词驱动) • 知识库(KG) • Constructing query graph • Entity linking • Predicate mapping
3. Who is the youngestPulitzer Prize winner? Person Pulitzer_Prize ?x award • 词性转换 winner award • 形容词最高级的语义理解 SELECT DISTINCT ?uri WHERE { ?uri dbo:awardres:Pulitzer_Prize . ?uri dbo:birthDate ?d . } ORDER BY DESC(?d) OFFSET 0 LIMIT 1
4. Which animals are critically endangered? Animal • No NN|NP followed ?x ?? ??
4. Which animals are critically endangered? Animal SELECT DISTINCT ?uri WHERE { ?uri rdf:type dbo:Animal . ?uri dbo:conservationStatus 'CR' . } ?x CR ?status
16. Which types of grapes grow in Oregon? Grape Grape SELECT DISTINCT ?uri WHERE {res:Oregon_wine dbo:growingGrape ?uri .} type, subClassOf ?x ?x Oregon_wine Oregon ?growIn ?growingGraph
46. List the seven kings of Rome ?x Rome king ?x King_of_Rome title SELECT DISTINCT ?uri WHERE {?uri dbp:title res:King_of_Rome .}
36. Desserts from which country contain fish? Dessert Country origin ingredient ?y ?x Fish
45. How many ethnic groups live in Slovenia? ?ethnicGroup ?x ?x Slovenia Slovenia ?liveIn ethnicGroup SELECT COUNT(DISTINCT ?uri) WHERE { res:Slovenia dbo:ethnicGroup ?uri . }
55. In which city where Charlie Chaplin's half brothers born? City Charlie_Chaplin ?half brother ?x ?y birthPlace ASK WHERE { res:Charlie_Chaplin dbo:relative ?x . ?x text:"half brother of" ?res:Charlie_Chaplin . ?x dbo:birthPlace ?y . ?y text:"is a" text:"city" . }
59. Which movie by the Coen brothers starsJohn Turturro in the role of aNew York City playwright?
59. Which movie by the Coen brothers starsJohn Turturro in the role of aNew York City playwright?
59. Which movie by the Coen brothers starsJohn Turturro in the role of aNew York City playwright? Film Coen_brothers director ?x John_Turturro starring In the role of a NY city playwright SELECT DISTINCT ?uri WHERE { ?uri rdf:type dbo:Film . ?uri dbo:director res:Coen_brothers . ?uri dbo:starring res:John_Turturro . res:John_Turturro text:"role" text:"New York City playwright". }
20. Which movies starring Brad Pittwere directed by Guy Ritchie?
34. Which museum in New York hasthe most visitors? Museum New_York_City location ?x ?? ??has the most visitors SELECT DISTINCT ?uri WHERE { ?uri rdf:type dbo:Museum . ?uri dbo:location res:New_York_City . ?uri dbo:numberOfVisitors ?num . } ORDER BY DESC(?num) OFFSET 0 LIMIT 1
60. Which of the volcanoes that erupted in 1550 is still active? ?uri rdf:type dbo:Volcano . ?uri dbo:eruptionYear ?y . FILTER (year(?y) = 1550)
句子理解 • 句子模式(并列、因果、比较、从句) • 知识库(KG),概念模型 • Constructing knowledge graph(KBP) • Entity discovery and linking (EDL) • Predicate mapping/creating a new one