1
0
mirror of https://github.com/balkian/gists.git synced 2024-12-22 14:28:12 +00:00
gists/repos/9056b004cfa3edcb1ef3/PT_MA_to_Marl
J. Fernando Sánchez d8729e4833 Add 'repos/9056b004cfa3edcb1ef3/' from commit 'cb19669f89c51f6fd189a8e4c30765d7c976e140'
git-subtree-dir: repos/9056b004cfa3edcb1ef3
git-subtree-mainline: 62679193ca
git-subtree-split: cb19669f89
2021-10-30 15:14:06 +02:00

49 lines
1.3 KiB
Plaintext

{
"@context": {
"marl": "http://gsi.dit.upm.es/ontologies/marl#",
"pt": "http://paradigmatecnologico.com/domains#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"marl:domain": {
"@type": "@id"
},
"field2": {
"@id": "_:field2",
"@type" : "xsd:string",
"http://www.w3.org/2000/01/rdf-schema#label": "Field with the POS tagging"
},
"field3": {
"@id": "_:field3",
"@type" : "xsd:string",
"http://www.w3.org/2000/01/rdf-schema#label": "Modified version of the source, verbs in infinitive and singular forms"
},
"field4": {
"@id": "_:field4",
"@type" : "xsd:string",
"http://www.w3.org/2000/01/rdf-schema#label": "Entity"
}
},
"@graph": [
{
"@id": "{{ linesplit(f.name,"/")[-1] }}",
"@type": "marl:SentimentAnalysis",
"marl:maxPolarityValue": 10,
"marl:minPolarityValue": 0
},
{% for line in f %}
{% set i=linesplit(line, "\t") %}
{% set node="_:BlankNode%s" % loop.index %}
{
"@id": "{{ node }}",
"@type": "marl:opinion",
"marl:opinionText": {{ i[1] | escapejs }},
"marl:domain": "pt:{{ i[0] }}",
"marl:polarityValue": {{ i[5] }},
"field0": {{ i[0] | escapejs }},
"field3": {{ i[3] | escapejs }},
"field4": {{ i[4] | escapejs }}
} {% if not loop.last %} , {% endif %}
{% endfor %}
]
}