mirror of
https://github.com/balkian/gists.git
synced 2025-04-10 23:19:23 +00:00
git-subtree-dir: repos/9056b004cfa3edcb1ef3 git-subtree-mainline: 62679193cad3d2d6c14b54be6fcf10012228ff03 git-subtree-split: cb19669f89c51f6fd189a8e4c30765d7c976e140
47 lines
1.1 KiB
Plaintext
47 lines
1.1 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"
|
|
},
|
|
"field0": {
|
|
"@id": "_:field0",
|
|
"@type" : "xsd:string"
|
|
},
|
|
"field3": {
|
|
"@id": "_:field3",
|
|
"@type" : "xsd:string"
|
|
},
|
|
"field4": {
|
|
"@id": "_:field4",
|
|
"@type" : "xsd:string"
|
|
}
|
|
},
|
|
"@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[2] | escape }}",
|
|
"marl:extractedfrom": "{{ i[5] }}",
|
|
"marl:domain": "pt:{{ i[1] }}",
|
|
"marl:polarityValue": {{ i[6] }},
|
|
"field0": "{{ i[0] }}",
|
|
"field3": "{{ i[3] }}",
|
|
"field4": "{{ i[4] }}"
|
|
|
|
} {% if not loop.last %} , {% endif %}
|
|
{% endfor %}
|
|
]
|
|
} |