1
0
mirror of https://github.com/balkian/gists.git synced 2024-11-24 02:12:29 +00:00
gists/PT_SA_to_Marl

55 lines
1.5 KiB
Plaintext
Raw Normal View History

2013-10-21 11:26:10 +00:00
{
"@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"
2013-10-21 15:42:24 +00:00
},
"field6": {
"@id": "_:field6",
"@type" : "xsd:string",
"http://www.w3.org/2000/01/rdf-schema#label": "Synsets in the text"
2013-10-21 11:26:10 +00:00
}
},
"@graph": [
2013-10-21 15:42:24 +00:00
2013-10-21 11:26:10 +00:00
{
"@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",
2013-10-21 15:42:24 +00:00
"marl:opinionText": {{ i[1] | escapejs }},
2013-10-21 11:26:10 +00:00
"marl:domain": "pt:{{ i[0] }}",
"marl:polarityValue": {{ i[5] }},
2013-10-21 15:42:24 +00:00
"field0": {{ i[0] | escapejs }},
"field3": {{ i[3] | escapejs }},
"field4": {{ i[4] | escapejs }},
"field6": {{ i[6] | escapejs }}
2013-10-21 11:26:10 +00:00
} {% if not loop.last %} , {% endif %}
{% endfor %}
]
}