1
0
mirror of https://github.com/gsi-upm/senpy synced 2024-11-25 01:22:28 +00:00
senpy/docs/examples.rst

79 lines
2.4 KiB
ReStructuredText
Raw Permalink Normal View History

2017-04-07 12:19:08 +00:00
Examples
------
All the examples in this page use the :download:`the main schema <_static/schemas/definitions.json>`.
2016-03-31 09:56:32 +00:00
Simple NIF annotation
.....................
2016-03-31 09:56:32 +00:00
Description
,,,,,,,,,,,
2016-03-31 09:56:32 +00:00
This example covers the basic example in the NIF documentation: `<http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core/nif-core.html>`_.
Representation
,,,,,,,,,,,,,,
.. literalinclude:: examples/results/example-basic.json
2016-03-31 09:56:32 +00:00
:language: json-ld
Sentiment Analysis
.....................
2016-03-31 09:56:32 +00:00
Description
,,,,,,,,,,,
2017-04-07 12:19:08 +00:00
This annotation corresponds to the sentiment analysis of an input. The example shows the sentiment represented according to Marl format.
The sentiments detected are contained in the Sentiments array with their related part of the text.
2016-03-31 09:56:32 +00:00
Representation
,,,,,,,,,,,,,,
2016-03-31 09:56:32 +00:00
.. literalinclude:: examples/results/example-sentiment.json
2016-03-31 09:56:32 +00:00
:emphasize-lines: 5-10,25-33
:language: json-ld
Suggestion Mining
.................
2016-03-31 09:56:32 +00:00
Description
,,,,,,,,,,,
2017-04-07 12:19:08 +00:00
The suggestions schema represented below shows the suggestions detected in the text. Within it, we can find the NIF fields highlighted that corresponds to the text of the detected suggestion.
2016-03-31 09:56:32 +00:00
Representation
,,,,,,,,,,,,,,
2016-03-31 09:56:32 +00:00
.. literalinclude:: examples/results/example-suggestion.json
2016-03-31 09:56:32 +00:00
:emphasize-lines: 5-8,22-27
:language: json-ld
Emotion Analysis
................
2016-03-31 09:56:32 +00:00
Description
,,,,,,,,,,,
2017-04-07 12:19:08 +00:00
This annotation represents the emotion analysis of an input to Senpy. The emotions are contained in the emotions section with the text that refers to following Onyx format and the emotion model defined beforehand.
2016-03-31 09:56:32 +00:00
Representation
,,,,,,,,,,,,,,
2016-03-31 09:56:32 +00:00
.. literalinclude:: examples/results/example-emotion.json
2016-03-31 09:56:32 +00:00
:language: json-ld
:emphasize-lines: 5-8,25-37
Named Entity Recognition
........................
2016-03-31 09:56:32 +00:00
Description
,,,,,,,,,,,
2017-04-07 12:19:08 +00:00
The Named Entity Recognition is represented as follows. In this particular case, it can be seen within the entities array the entities recognised. For the example input, Microsoft and Windows Phone are the ones detected.
2016-03-31 09:56:32 +00:00
Representation
,,,,,,,,,,,,,,
2016-03-31 09:56:32 +00:00
.. literalinclude:: examples/results/example-ner.json
2016-03-31 09:56:32 +00:00
:emphasize-lines: 5-8,19-34
:language: json-ld
Complete example
................
2016-03-31 09:56:32 +00:00
Description
,,,,,,,,,,,
2016-03-31 09:56:32 +00:00
This example covers all of the above cases, integrating all the annotations in the same document.
Representation
,,,,,,,,,,,,,,
2016-03-31 09:56:32 +00:00
.. literalinclude:: examples/results/example-complete.json
2016-03-31 09:56:32 +00:00
:language: json-ld