Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emotion annotation scenario #43

Open
luigi-asprino opened this issue Feb 22, 2021 · 16 comments
Open

Emotion annotation scenario #43

luigi-asprino opened this issue Feb 22, 2021 · 16 comments
Labels

Comments

@luigi-asprino
Copy link
Collaborator

luigi-asprino commented Feb 22, 2021

Depends on

#30

Description

Emotion detector annotates a piece of text with emotions of the Pluchick ontology.

Source

WP3-WP6 working group

Competency Questions

cf. #30

Ontology/Ontology Design Patterns Relevant for the scenario

cf. #30

MARL Opinion Ontology for representing polarity

SPARQL Questions

cf. #30

Toy Dataset/SPARQL Endpoint

{
  "@context" : {
    "dbr" : "http://dbpedia.org/resource/",
    "earmark" : "http://www.essepuntato.it/2008/12/earmark#",
    "emotion" : "https://w3id.org/spice/SON/PlutchikEmotion/",
    "ex" : "http://example.org/",
    "marl" : "http://www.gsi.upm.es/ontologies/marl/ns#",
    "owl" : "http://www.w3.org/2002/07/owl#",
    "rdfs" : "http://www.w3.org/2000/01/rdf-schema#",
    "semiotics" : "http://ontologydesignpatterns.org/cp/owl/semiotics.owl#",
    "xsd" : "http://www.w3.org/2001/XMLSchema#",
    "sentilo":"http://ontologydesignpatterns.org/ont/sentilo.owl"
  },
  "@graph" : [ {
    "@id" : "ex:docuverse",
    "@type" : "earmark:StringDocuverse",
    "@language" : "en",
    "earmark:hasContent" : "Josephus Flavius provided us with a glimpse into one of the most interesting times of our people, on the other hand, his act of betrayal is intensified by being one of the leaders of the rebellion. This arises the question: Why is it the elite that abandons the people in times of rebellion? Another question also arises as to why it is not satisfied with betrayel, but rather as Joseph the son of Matityahu who is not satisfied with his act of betrayal but performs a moral and cultural assimilation when he becomes Josephus Flavius?",
    "sentilo:scoreType": [{
      "@type" : "emotion:Calmness",
      "@id": "ex:anno_docuverse_calm",
      "sentilo:avgScore": "0.1"
    },
    {
      "@type": "marl:Positive",
      "@id":"ex:anno_docuverse_positive",
      "sentilo:avgScore": "0.1"
    }]
  }, {
    "@id" : "ex:anno_0_emotion_341-350",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "satisfied",
    "semiotics:denotes" : [{
      "@type" : "emotion:Calmness",
      "@id": "ex:anno_0_emotion_341-350_calm"
    },{
      "@type" : "emotion:Joy",
      "@id": "ex:anno_0_emotion_341-350_joy"
    }],
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "341",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "350",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_2_emotion_419-428",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "satisfied",
    "semiotics:denotes" : {
      "@type" : "emotion:Calmness",
			"@id" : "ex:anno_2_emotion_419-428_calm"
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "419",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "428",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_3_emotion_419-428",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "satisfied",
    "semiotics:denotes" : {
      "@type" : "emotion:Joy",
			"@id" : "ex:anno_3_emotion_419-428"
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "419",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "428",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_4_emotion_249-257",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "abandons",
    "semiotics:denotes" : {
      "@type" : "emotion:Fear",
			"@id" : "ex:anno_4_emotion_249-257_fear"
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "249",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "257",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_5_emotion_249-257",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "abandons",
    "semiotics:denotes" : {
      "@type" : "emotion:Sadness",
			"@id" : "ex:anno_5_emotion_249-257_sad"
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "249",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "257",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_6_entity_0-16",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "Josephus Flavius",
    "semiotics:denotes" : {
      "@id" : "dbr:Josephus",
      "@type" : [ "http://dbpedia.org/ontology/Person" ]
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "0",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "16",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_7_entity_65-82",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "interesting times",
    "semiotics:denotes" : {
      "@id" : "dbr:Interesting_Times",
      "@type" : [ "http://dbpedia.org/ontology/Book", "http://dbpedia.org/ontology/WrittenWork", "http://dbpedia.org/ontology/Work" ]
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "65",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "82",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_8_entity_128-136",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "betrayal",
    "semiotics:denotes" : {
      "@id" : "dbr:Betrayal",
      "@type" : [ "http://www.w3.org/2002/07/owl#Thing" ]
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "128",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "136",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_9_entity_172-179",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "leaders",
    "semiotics:denotes" : {
      "@id" : "dbr:Leadership",
      "@type" : [ "http://dbpedia.org/ontology/PersonFunction" ]
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "172",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "179",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_10_entity_187-196",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "rebellion",
    "semiotics:denotes" : {
      "@id" : "dbr:Rebellion",
      "@type" : [ "http://dbpedia.org/ontology/PersonFunction" ]
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "187",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "196",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_11_entity_198-202",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "This",
    "semiotics:denotes" : {
      "@id" : "dbr:Sathya_Sai_Baba",
      "@type" : [ "http://dbpedia.org/ontology/Agent", "http://dbpedia.org/ontology/Religious", "http://dbpedia.org/ontology/Person" ]
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "198",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "202",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_12_entity_203-209",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "arises",
    "semiotics:denotes" : {
      "@id" : "dbr:Four_Noble_Truths",
      "@type" : [ "http://www.w3.org/2002/07/owl#Thing" ]
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "203",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "209",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_13_entity_238-243",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "elite",
    "semiotics:denotes" : {
      "@id" : "dbr:Elite",
      "@type" : [ "http://dbpedia.org/ontology/RecordLabel" ]
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "238",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "243",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_14_entity_281-290",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "rebellion",
    "semiotics:denotes" : {
      "@id" : "dbr:Rebellion",
      "@type" : [ "http://dbpedia.org/ontology/PersonFunction" ]
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "281",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "290",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_15_entity_292-299",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "Another",
    "semiotics:denotes" : {
      "@id" : "dbr:Bad_Kreuznach_station",
      "@type" : [ "http://dbpedia.org/ontology/Infrastructure", "http://dbpedia.org/ontology/Place", "http://dbpedia.org/ontology/ArchitecturalStructure", "http://dbpedia.org/ontology/Location", "http://dbpedia.org/ontology/Station" ]
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "292",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "299",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_16_entity_314-320",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "arises",
    "semiotics:denotes" : {
      "@id" : "dbr:Four_Noble_Truths",
      "@type" : [ "http://www.w3.org/2002/07/owl#Thing" ]
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "314",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "320",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_17_entity_341-350",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "satisfied",
    "semiotics:denotes" : {
      "@id" : "dbr:Satisfiability",
      "@type" : [ "http://www.w3.org/2002/07/owl#Thing" ]
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "341",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "350",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_18_entity_380-386",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "Joseph",
    "semiotics:denotes" : {
      "@id" : "dbr:Saint_Joseph",
      "@type" : [ "http://dbpedia.org/ontology/Person", "http://dbpedia.org/ontology/Agent", "http://dbpedia.org/ontology/Saint", "http://dbpedia.org/ontology/Cleric" ]
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "380",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "386",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_19_entity_398-407",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "Matityahu",
    "semiotics:denotes" : {
      "@id" : "dbr:Mattathias",
      "@type" : [ "http://dbpedia.org/ontology/Agent", "http://dbpedia.org/ontology/Person", "http://dbpedia.org/ontology/Royalty" ]
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "398",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "407",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_20_entity_419-428",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "satisfied",
    "semiotics:denotes" : {
      "@id" : "dbr:Satisfiability",
      "@type" : [ "http://www.w3.org/2002/07/owl#Thing" ]
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "419",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "428",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_21_entity_445-453",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "betrayal",
    "semiotics:denotes" : {
      "@id" : "dbr:Betrayal",
      "@type" : [ "http://www.w3.org/2002/07/owl#Thing" ]
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "445",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "453",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_22_entity_479-500",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "cultural assimilation",
    "semiotics:denotes" : {
      "@id" : "dbr:Cultural_assimilation",
      "@type" : [ "http://www.w3.org/2002/07/owl#Thing" ]
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "479",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "500",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_23_entity_517-533",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "Josephus Flavius",
    "semiotics:denotes" : {
      "@id" : "dbr:Josephus",
      "@type" : [ "http://dbpedia.org/ontology/Person" ]
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "517",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "533",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_24_sentiment_415-428",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "not satisfied",
    "semiotics:denotes" : {
      "@id" : "marl:Negative"
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "415",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "428",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_25_sentiment_337-350",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "not satisfied",
    "semiotics:denotes" : {
      "@id" : "marl:Negative"
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "337",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "350",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_26_sentiment_249-257",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "abandons",
    "semiotics:denotes" : {
      "@id" : "marl:Negative"
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "249",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "257",
      "@type" : "xsd:nonNegativeInteger"
    }
  }, {
    "@id" : "ex:anno_27_sentiment_65-76",
    "@type" : "earmark:PointerRange",
    "rdfs:label" : "interesting",
    "semiotics:denotes" : {
      "@id" : "marl:Positive"
    },
    "earmark:refersTo" : {
      "@id" : "ex:docuverse"
    },
    "earmark:begins" : {
      "@value" : "65",
      "@type" : "xsd:nonNegativeInteger"
    },
    "earmark:ends" : {
      "@value" : "76",
      "@type" : "xsd:nonNegativeInteger"
    }
  } ]
}

@alessioBosca
Copy link

Hi @luigi-asprino ,

I would like to add a tag referring the whole document (specifically an overall document sentiment value). Should I create a range w.r.t. the whole document or do you suggest another approach?

@luigi-asprino
Copy link
Collaborator Author

Hi @alessioBosca,

What kind of annotation would you like to add? Could you give some examples?

Thanks!

Luigi

@alessioBosca
Copy link

Hi @luigi-asprino,

I would like to add an overall document sentiment value, I guess the value could be expressed like for the span

"semiotics:denotes" : {
"@id" : "marl:Positive"
},

however I'm not sure how to replace "@type" : "earmark:PointerRange", and begin/end . I can refer to the begin / end of the document but maybe there is a better way to express it

@luigi-asprino
Copy link
Collaborator Author

you can use semiotics:denotes as predicate, but I would rather use the docuverse (ex:docuverse in the example) as the subject of the triple to refer to the whole document instead of the pointer ranges.
I'm going to update the example above to reflect this annotation.

@aldogangemi
Copy link
Collaborator

aldogangemi commented Jan 19, 2022 via email

@luigi-asprino
Copy link
Collaborator Author

luigi-asprino commented Jan 19, 2022 via email

@aldogangemi
Copy link
Collaborator

aldogangemi commented Jan 19, 2022 via email

@luigi-asprino
Copy link
Collaborator Author

Great! Thank you

@alessioBosca
Copy link

@luigi-asprino @aldogangemi thanks for the update and examples

Alessio

@aldogangemi
Copy link
Collaborator

aldogangemi commented Jan 19, 2022 via email

@luigi-asprino
Copy link
Collaborator Author

Ok, shall we use sentilo:scoreType?
Could you add such object property to the sentilo ontology (I don't have access to the ODP's FTP server anymore).

@aldogangemi
Copy link
Collaborator

aldogangemi commented Jan 19, 2022 via email

@alessioBosca
Copy link

Hi @luigi-asprino and @aldogangemi, I would like to combine scoreType with avgScore (in order to provede a confidence value), I was thinking something like

"sentilo:scoreType" : [{
"@id": "marl:Positive",
"sentilo:avgScore": 0.6
},
{
"@type" : "emotion:Calmness",
"sentilo:avgScore": 0.82
}]

would that be OK?

@aldogangemi
Copy link
Collaborator

aldogangemi commented Jan 24, 2022 via email

@alessioBosca
Copy link

Thanks Aldo

@luigi-asprino
Copy link
Collaborator Author

Hi,

I have updated the example.
In the previous version marl:Positive was referred by punning, but in light of the considerations above (you need to associate a score to the specific annotato of the document), I think that a slightly better solution requires instantiating marl:Positive and associate the score to such instance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants