mirror of https://github.com/gsi-upm/senpy
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
79 lines
2.4 KiB
ReStructuredText
79 lines
2.4 KiB
ReStructuredText
7 years ago
|
Examples
|
||
7 years ago
|
------
|
||
8 years ago
|
All the examples in this page use the :download:`the main schema <_static/schemas/definitions.json>`.
|
||
8 years ago
|
|
||
|
Simple NIF annotation
|
||
7 years ago
|
.....................
|
||
8 years ago
|
Description
|
||
7 years ago
|
,,,,,,,,,,,
|
||
8 years ago
|
This example covers the basic example in the NIF documentation: `<http://persistence.uni-leipzig.org/nlp2rdf/ontologies/nif-core/nif-core.html>`_.
|
||
|
|
||
|
Representation
|
||
7 years ago
|
,,,,,,,,,,,,,,
|
||
|
.. literalinclude:: examples/results/example-basic.json
|
||
8 years ago
|
:language: json-ld
|
||
|
|
||
|
Sentiment Analysis
|
||
7 years ago
|
.....................
|
||
8 years ago
|
Description
|
||
7 years ago
|
,,,,,,,,,,,
|
||
7 years ago
|
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.
|
||
8 years ago
|
|
||
|
Representation
|
||
7 years ago
|
,,,,,,,,,,,,,,
|
||
8 years ago
|
|
||
7 years ago
|
.. literalinclude:: examples/results/example-sentiment.json
|
||
8 years ago
|
:emphasize-lines: 5-10,25-33
|
||
|
:language: json-ld
|
||
|
|
||
|
Suggestion Mining
|
||
7 years ago
|
.................
|
||
8 years ago
|
Description
|
||
7 years ago
|
,,,,,,,,,,,
|
||
7 years ago
|
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.
|
||
8 years ago
|
|
||
|
Representation
|
||
7 years ago
|
,,,,,,,,,,,,,,
|
||
8 years ago
|
|
||
7 years ago
|
.. literalinclude:: examples/results/example-suggestion.json
|
||
8 years ago
|
:emphasize-lines: 5-8,22-27
|
||
|
:language: json-ld
|
||
|
|
||
|
Emotion Analysis
|
||
7 years ago
|
................
|
||
8 years ago
|
Description
|
||
7 years ago
|
,,,,,,,,,,,
|
||
7 years ago
|
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.
|
||
8 years ago
|
|
||
|
Representation
|
||
7 years ago
|
,,,,,,,,,,,,,,
|
||
8 years ago
|
|
||
7 years ago
|
.. literalinclude:: examples/results/example-emotion.json
|
||
8 years ago
|
:language: json-ld
|
||
|
:emphasize-lines: 5-8,25-37
|
||
|
|
||
|
Named Entity Recognition
|
||
7 years ago
|
........................
|
||
8 years ago
|
Description
|
||
7 years ago
|
,,,,,,,,,,,
|
||
7 years ago
|
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.
|
||
8 years ago
|
Representation
|
||
7 years ago
|
,,,,,,,,,,,,,,
|
||
8 years ago
|
|
||
7 years ago
|
.. literalinclude:: examples/results/example-ner.json
|
||
8 years ago
|
:emphasize-lines: 5-8,19-34
|
||
|
:language: json-ld
|
||
|
|
||
|
Complete example
|
||
7 years ago
|
................
|
||
8 years ago
|
Description
|
||
7 years ago
|
,,,,,,,,,,,
|
||
8 years ago
|
This example covers all of the above cases, integrating all the annotations in the same document.
|
||
|
|
||
|
Representation
|
||
7 years ago
|
,,,,,,,,,,,,,,
|
||
8 years ago
|
|
||
7 years ago
|
.. literalinclude:: examples/results/example-complete.json
|
||
8 years ago
|
:language: json-ld
|