Legalo
From STLab
(Difference between revisions)
(→Producing semantic web relations) |
(→Subgraphs identification algorithm (implemented by the Semantic Web property extractor)) |
||
Line 21: | Line 21: | ||
'''for each''' pair <''e<sub>1</sub>, e<sub>2</sub>''> '''in''' ''C'' | '''for each''' pair <''e<sub>1</sub>, e<sub>2</sub>''> '''in''' ''C'' | ||
- | ''directPaths'' ← DFS in ''G'' retrieving | + | ''directPaths'' ← DFS in ''G'' retrieving the shortest direct paths between ''e<sub>1</sub>'' and ''e<sub>2</sub>'' |
'''if''' ''directPaths'' is not empty | '''if''' ''directPaths'' is not empty | ||
'''for each''' ''directPath'' '''in''' ''directPaths'' | '''for each''' ''directPath'' '''in''' ''directPaths'' |
Revision as of 21:00, 15 June 2014
Legalo
Subgraphs identification algorithm (implemented by the Semantic Web property extractor)
algorithm legalo is input G: a RDF graph from FRED output S: a set of RDF triples expressing semantic relations between named entities recognized in G let E the set of named entities in G let C the set of all named entity pairs combinations including permutations for each named entity e1 in E for each named entity e2 in E if e1 != e2' add <e1, e2'> to C let P a set of tuples <e1, e2, sub-graph> let DFS stand for depth first search for each pair <e1, e2> in C directPaths ← DFS in G retrieving the shortest direct paths between e1 and e2 if directPaths is not empty for each directPath in directPaths add <e1, e2, directPath> to P else for each node of type dul:Event event in G leftSubGraph ← DFS in G for retrieving the shortest direct paths connecting e1 and event rightSubGraph ← DFS in G for finding the shortest direct paths connecting event and e2 if rightSubGraph does not contain agentive roles add <e1, e2, rightSubGraph> to P let S a set of RDF triples for each tuple <e1, e2, sub-graph> in P property ← produce semantic web relation based on sub-graph add RDF triple e1 - property - e2 to S
Producing semantic web relations
Legalo produces a semantic web relation property based on each sub-graph included in P (cf. legalo algorithm) The label of property is generated by concatenating the labels included in the sub-graph according to a number of heuristics derived by incremental empirical observations. These heuristics are continuously evolving. Currently, the main ones are summarizes as follows:
- Given a direct path between e1 and e2, the label of property will be produced by concatenating the arc labels in the path and the more general types' labels of the nodes in the path. See example below:
dbpedia:Felix :memberOf dbpedia:All_Star_Band dbpedia:All_Star_Band :of dbpedia:Rino_Starr dbpedia:All_Star_Band rdf:type :Band would generate label(property) = memberOfBandOf and dbpedia:Felix :memberOfBandOf dbpedia:Ringo_Starr
- Given a sub-graph connecting e1 and e2 through a node event of type dul:Event, the label of property will be produced by concatenating the arc labels in the path and the more general types' labels of the nodes in the path, connecting event to e2. The arc labels of events' thematic roles are not used as they show in the graph, they are associated either with an empty label or with a lexicalization defined in a mapping table. See example below:
:invent_1 vn.role:Agent dbpedia:John_McCarty :invent_1 vn.role:Product dbpedia:Lisp :invent_1 rdf:type dul:Event dbpedia:Lisp rdf:type :Language would generate dbpedia:John_McCarty :inventLanguage dbpedia:Lisp
- Examples of mappings between thematic roles labels and their lexicalizations:
- vnrole:Beneficiary → for
- vnrole:Instrument → with
- vnrole:Destination → to
- vnrole:Topic → about