-
Notifications
You must be signed in to change notification settings - Fork 6
Framester Documentation
Framester is a hub between FrameNet, WordNet, VerbNet, BabelNet, DBpedia, Yago, DOLCE-Zero, as well as other resources. Framester does not simply creates a strongly connected knowledge graph, but also applies a rigorous formal treatment for Fillmore's frame semantics, enabling full-fledged OWL querying and reasoning on the created joint frame-based knowledge graph. The figure shows all the structure of Framester.
Framester is organized in named graphs. Each named graph contains a meaningful subset of the resource. Within the source files named graphs are typed as owl:Ontology. Each source file contains a graph declaration, a description (provided as rdfs:comment) and version information (i.e. owl:versionInfo); for example data/coreframerelations.ttl
framester-data:coreframerelations rdf:type owl:Ontology ; rdfs:comment """The core frame relations cloned from FrameNet 1.5.""" ; owl:versionInfo """1.0, 19-04-2016 by Aldo Gangemi""" .
This means that all the triples within the file coreframerelations.ttl are uploaded on the named graph framester-data:coreframerelations.
The mappings from word senses to FrameNet frames can be obtained using "skos:closeMatch". Different profiles are accessible through their named graphs (e.g. https://w3id.org/framester/data/fn2bnFprofile refers to the Framester's F-Profile mapping) The list of named graphs containing BabelNet to FrameNet mappings can be retrieved firing the following query.
SELECT DISTINCT ?g ?o ?c
WHERE{
GRAPH ?g {
?g a ?o
OPTIONAL {?g rdfs:comment ?c}
}
FILTER(regex(str(?g),"fn2bn"))
}
Following is the query which extracts FrameNet frames associated to the word sense "http://babelnet.org/rdf/s00087679v" for the word "Enter" from the Profile-F.
PREFIX bn: <http://babelnet.org/rdf/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX framester-data: <https://w3id.org/framester/data/>
SELECT DISTINCT ?s
WHERE {
GRAPH framester-data:fn2bnFprofile {?s skos:closeMatch bn:s00087679v}
}
FrameNet defines several relations between frames which can be access through the following predicates: inheritsFrom, isCausativeOf, isInchoativeOf, isInheritedBy, isPerspectivizedIn, isPrecededBy, isUsedBy, perspectiveOn, hasCausative. Following is the query obtaining the frames which are causative of the frame "Apply_heat".
PREFIX fn15schema: <https://w3id.org/framester/framenet/tbox/>
PREFIX frame: <https://w3id.org/framester/framenet/abox/frame/>
SELECT DISTINCT ?frame
WHERE {
frame:Apply_heat fn15schema:isCausativeOf ?frame
}
It contains the materialized subsumption taxonomy of FrameNet, also including the SuperFe relations from FrameNet, and the GenericFE abstracted from frame elements. Three categories of generic roles of Framester's core frames are defined i.e., "necessaryRole", "optionalRole" and "externalRole". Each frame Following SPARQL Query lists down all the necessary roles of the FrameNet frame "AbsorbHeat".
PREFIX framestercore: <https://w3id.org/framester/data/framestercore/>
PREFIX fschema: <https://w3id.org/framester/schema/>
SELECT DISTINCT ?roles
WHERE {
framestercore:AbsorbHeat fschema:necessaryRole ?roles
}
Framester defines links between FrameNet frames passing through Synsets. The following query can be used to retieve the named graphs containing the Mappaing of the DBpedia resources to Framester's frame.
SELECT DISTINCT ?g
WHERE{
GRAPH ?g {?s a ?o}
FILTER (regex(str(?g),"fn2dbr")|| regex(str(?g),"dbr2fn"))
}
Following is the query for retrieving DBpedia resources connected to the Frame "Text".
PREFIX fschema: <https://w3id.org/framester/schema/>
PREFIX frame: <https://w3id.org/framester/framenet/abox/frame/>
SELECT DISTINCT ?frame
WHERE {
?frame fschema:playsRoleIn frame:Text .
}
A linking between FrameNet frames and DOLCE-Zero classes, passing through noun synsets. Passing through adverb synsets, links between FrameNet frames and DOLCE-Zero Quality class can be accessed. Moreover, new quality subclasses might be discovered based on frames. Finally, a linking between FrameNet frames and Supersenses (lexical names), passing through verb synsets is also accessible. The named graphs that contains Framenet to D0 mappings can be retrieved firing the following query.
SELECT DISTINCT ?g
WHERE {
GRAPH ?g {?g a ?o}
FILTER (regex(str(?g),"fn2d0"))
}
The following query passed through noun synset "juice" gets the FrameNet frames and DOLCE-Zero classes.
PREFIX fn2d0: <https://w3id.org/framester/fn2d0/> PREFIX wn30instances: <https://w3id.org/framester/wn/wn30/instances/> PREFIX framester-data: <https://w3id.org/framester/data/>
SELECT DISTINCT ?frame ?dulclass
WHERE {
GRAPH framester-data:fn2d0basenoun {
?s fn2d0:forSynset wn30instances:synset-juice-noun-1 .
?s fn2d0:onFrame ?frame .
?s fn2d0:hasFoundational ?dulclass .
}
}
A safe refactoring of DepecheMood lemmas as WordNet wordsenses. It keeps the mood mappings along with their scores. The scores are based on several different moods such as ANNOYED, AFRAID, AMUSED, ANGRY, DONT_CARE, HAPPY, INSPIRED, SAD. Following is the sample query getting all the synsets having happiness scores greater than 0.8.
PREFIX depmood: <https://w3id.org/framester/depechemood/depechemood2wn/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX fn15schema: <https://w3id.org/framester/framenet/tbox/>
SELECT DISTINCT ?frame ?score
WHERE {
?synset depmood:HAPPYscore ?score .
?frame skos:closeMatch ?synset .
?frame a fn15schema:Frame .
FILTER (?score > 0.8)
}
DeepKnowNet is a topic-model based on deep-learning. It assigns appropriate word senses to large sets of topically related words acquired from the web, named TSWEB. The following SPARQL query gets topical association for the frame "Leadership".
PREFIX fschema: <https://w3id.org/framester/schema/>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX frame: <https://w3id.org/framester/framenet/abox/frame/>
SELECT DISTINCT ?topic ?synset
WHERE {
?topic fschema:topicallyAssociatedWith ?synset .
frame:Leadership skos:closeMatch ?synset .
}
JSON output of the FrameNet frames tagged can be obtained by the following curl command:
curl {URL-to-API} -d "data={Sentence}:{Profile}" -X PUT
Sample Command using Profile T:
curl https://lipn.univ-paris13.fr/framester/en/wfd_json/sentence -d "data=Tigers once ranged widely across Asia, from Turkey in the west to the eastern coast of Russia.:t" -X PUT
Output:
{
"Tigers once ranged widely across Asia, from Turkey in the west to the eastern coast of Russia.": [
[
"word: Tigers",
"position: 0-6",
"bnsynset: http://babelnet.org/rdf/s00077225n",
"frames: []",
"profile: t"
],
[
"word: ranged",
"position: 12-18",
"bnsynset: http://babelnet.org/rdf/s00084145v",
"frames: [u'https://w3id.org/framester/framenet/abox/frame/Cause_impact']",
"profile: t"
],
[
"word: widely",
"position: 19-25",
"bnsynset: http://babelnet.org/rdf/s00117625r",
"frames: []",
"profile: t"
],
[
"word: Asia",
"position: 33-37",
"bnsynset: http://babelnet.org/rdf/s00006329n",
"frames: [u'https://w3id.org/framester/framenet/abox/frame/Natural_features']",
"profile: t"
],
[
"word: Turkey",
"position: 44-50",
"bnsynset: http://babelnet.org/rdf/s00067236n",
"frames: [u'https://w3id.org/framester/framenet/abox/frame/Political_locales']",
"profile: t"
],
[
"word: eastern",
"position: 70-77",
"bnsynset: http://babelnet.org/rdf/s00101967a",
"frames: []",
"profile: t"
],
[
"word: coast",
"position: 78-83",
"bnsynset: http://babelnet.org/rdf/s00020164n",
"frames: [u'https://w3id.org/framester/framenet/abox/frame/Relational_natural_features']",
"profile: t"
],
[
"word: once",
"position: 7-11",
"bnsynset: ",
"frames: []",
"profile: t"
],
[
"word: across",
"position: 26-32",
"bnsynset: ",
"frames: []",
"profile: t"
],
[
"word: Asia,",
"position: 33-38",
"bnsynset: ",
"frames: []",
"profile: t"
],
[
"word: from",
"position: 39-43",
"bnsynset: ",
"frames: []",
"profile: t"
],
[
"word: in",
"position: 51-53",
"bnsynset: ",
"frames: []",
"profile: t"
],
[
"word: the",
"position: 54-57",
"bnsynset: ",
"frames: []",
"profile: t"
],
[
"word: west",
"position: 58-62",
"bnsynset: ",
"frames: []",
"profile: t"
],
[
"word: to",
"position: 63-65",
"bnsynset: ",
"frames: []",
"profile: t"
],
[
"word: the",
"position: 54-57",
"bnsynset: ",
"frames: []",
"profile: t"
],
[
"word: of",
"position: 84-86",
"bnsynset: ",
"frames: []",
"profile: t"
],
[
"word: Russia",
"position: 87-93",
"bnsynset: ",
"frames: []",
"profile: t"
]
]
}