From 02b8ce82124b0633e003cc0afa8ee6a3d6c4588c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fernando=20S=C3=A1nchez?= Date: Mon, 21 Oct 2013 04:26:10 -0700 Subject: [PATCH] --- PT_HA_to_Marl | 47 ++++++++++++++++++++++++++++++++++++++++++++ PT_SA_to_Marl | 54 +++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 101 insertions(+) create mode 100644 PT_HA_to_Marl create mode 100644 PT_SA_to_Marl diff --git a/PT_HA_to_Marl b/PT_HA_to_Marl new file mode 100644 index 0000000..bfc3227 --- /dev/null +++ b/PT_HA_to_Marl @@ -0,0 +1,47 @@ +{ + "@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 %} +] +} \ No newline at end of file diff --git a/PT_SA_to_Marl b/PT_SA_to_Marl new file mode 100644 index 0000000..adb7d75 --- /dev/null +++ b/PT_SA_to_Marl @@ -0,0 +1,54 @@ +{ + "@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" + }, + "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] | escape }}", + "marl:domain": "pt:{{ i[0] }}", + "marl:polarityValue": {{ i[5] }}, + "field0": "{{ i[0] | escape }}", + "field3": "{{ i[3] | escape }}", + "field4": "{{ i[4] | escape }}" + + } {% if not loop.last %} , {% endif %} +{% endfor %} +] +} \ No newline at end of file