mirror of https://github.com/gsi-upm/senpy
New schema for parameters
* Add parameters as an entity in the schema * Update examples to include parameters * Change the API for processing plugins, params is a parameter again, instead of only adding the request. * Update tests51-calculate-and-expose-list-of-parameters-for-the-combination-of-plugins
parent
6a1069780b
commit
c090501534
@ -1,78 +0,0 @@
|
|||||||
{
|
|
||||||
"@context": "http://mixedemotions-project.eu/ns/context.jsonld",
|
|
||||||
"@id": "me:Result1",
|
|
||||||
"@type": "results",
|
|
||||||
"analysis": [
|
|
||||||
"me:SAnalysis1",
|
|
||||||
"me:SgAnalysis1",
|
|
||||||
"me:EmotionAnalysis1",
|
|
||||||
"me:NER1",
|
|
||||||
{
|
|
||||||
"@type": "analysis",
|
|
||||||
"@id": "anonymous"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"entries": [
|
|
||||||
{
|
|
||||||
"@id": "http://micro.blog/status1",
|
|
||||||
"@type": [
|
|
||||||
"nif:RFC5147String",
|
|
||||||
"nif:Context"
|
|
||||||
],
|
|
||||||
"nif:isString": "Dear Microsoft, put your Windows Phone on your newest #open technology program. You'll be awesome. #opensource",
|
|
||||||
"entities": [
|
|
||||||
{
|
|
||||||
"@id": "http://micro.blog/status1#char=5,13",
|
|
||||||
"nif:beginIndex": 5,
|
|
||||||
"nif:endIndex": 13,
|
|
||||||
"nif:anchorOf": "Microsoft",
|
|
||||||
"me:references": "http://dbpedia.org/page/Microsoft",
|
|
||||||
"prov:wasGeneratedBy": "me:NER1"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"@id": "http://micro.blog/status1#char=25,37",
|
|
||||||
"nif:beginIndex": 25,
|
|
||||||
"nif:endIndex": 37,
|
|
||||||
"nif:anchorOf": "Windows Phone",
|
|
||||||
"me:references": "http://dbpedia.org/page/Windows_Phone",
|
|
||||||
"prov:wasGeneratedBy": "me:NER1"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"suggestions": [
|
|
||||||
{
|
|
||||||
"@id": "http://micro.blog/status1#char=16,77",
|
|
||||||
"nif:beginIndex": 16,
|
|
||||||
"nif:endIndex": 77,
|
|
||||||
"nif:anchorOf": "put your Windows Phone on your newest #open technology program",
|
|
||||||
"prov:wasGeneratedBy": "me:SgAnalysis1"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"sentiments": [
|
|
||||||
{
|
|
||||||
"@id": "http://micro.blog/status1#char=80,97",
|
|
||||||
"nif:beginIndex": 80,
|
|
||||||
"nif:endIndex": 97,
|
|
||||||
"nif:anchorOf": "You'll be awesome.",
|
|
||||||
"marl:hasPolarity": "marl:Positive",
|
|
||||||
"marl:polarityValue": 0.9,
|
|
||||||
"prov:wasGeneratedBy": "me:SAnalysis1"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"emotions": [
|
|
||||||
{
|
|
||||||
"@id": "http://micro.blog/status1#char=0,109",
|
|
||||||
"nif:anchorOf": "Dear Microsoft, put your Windows Phone on your newest #open technology program. You'll be awesome. #opensource",
|
|
||||||
"prov:wasGeneratedBy": "me:EAnalysis1",
|
|
||||||
"onyx:hasEmotion": [
|
|
||||||
{
|
|
||||||
"onyx:hasEmotionCategory": "wna:liking"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"onyx:hasEmotionCategory": "wna:excitement"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
@ -1,19 +1,18 @@
|
|||||||
{
|
{
|
||||||
"@context": "http://mixedemotions-project.eu/ns/context.jsonld",
|
"@context": "http://mixedemotions-project.eu/ns/context.jsonld",
|
||||||
"@id": "http://example.com#NIFExample",
|
"@id": "me:Result1",
|
||||||
"@type": "results",
|
"@type": "results",
|
||||||
"analysis": [
|
"analysis": [ ],
|
||||||
],
|
"entries": [
|
||||||
"entries": [
|
{
|
||||||
{
|
"@id": "http://example.org#char=0,40",
|
||||||
"@id": "http://example.org#char=0,40",
|
"@type": [
|
||||||
"@type": [
|
"nif:RFC5147String",
|
||||||
"nif:RFC5147String",
|
"nif:Context"
|
||||||
"nif:Context"
|
],
|
||||||
],
|
"nif:beginIndex": 0,
|
||||||
"nif:beginIndex": 0,
|
"nif:endIndex": 40,
|
||||||
"nif:endIndex": 40,
|
"nif:isString": "My favourite actress is Natalie Portman"
|
||||||
"nif:isString": "My favourite actress is Natalie Portman"
|
}
|
||||||
}
|
]
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
@ -1,88 +1,100 @@
|
|||||||
{
|
{
|
||||||
"@context": "http://mixedemotions-project.eu/ns/context.jsonld",
|
"@context": "http://mixedemotions-project.eu/ns/context.jsonld",
|
||||||
"@id": "me:Result1",
|
"@id": "me:Result1",
|
||||||
"@type": "results",
|
"@type": "results",
|
||||||
"analysis": [
|
"analysis": [
|
||||||
{
|
|
||||||
"@id": "me:SAnalysis1",
|
|
||||||
"@type": "marl:SentimentAnalysis",
|
|
||||||
"marl:maxPolarityValue": 1,
|
|
||||||
"marl:minPolarityValue": 0
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"@id": "me:SgAnalysis1",
|
|
||||||
"@type": "me:SuggestionAnalysis"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"@id": "me:EmotionAnalysis1",
|
|
||||||
"@type": "me:EmotionAnalysis"
|
|
||||||
},
|
|
||||||
{
|
|
||||||
"@id": "me:NER1",
|
|
||||||
"@type": "me:NER"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"entries": [
|
|
||||||
{
|
|
||||||
"@id": "http://micro.blog/status1",
|
|
||||||
"@type": [
|
|
||||||
"nif:RFC5147String",
|
|
||||||
"nif:Context"
|
|
||||||
],
|
|
||||||
"nif:isString": "Dear Microsoft, put your Windows Phone on your newest #open technology program. You'll be awesome. #opensource",
|
|
||||||
"entities": [
|
|
||||||
{
|
{
|
||||||
"@id": "http://micro.blog/status1#char=5,13",
|
"@id": "_:SAnalysis1_Activity",
|
||||||
"nif:beginIndex": 5,
|
"@type": "marl:SentimentAnalysis",
|
||||||
"nif:endIndex": 13,
|
"prov:wasAssociatedWith": "me:SentimentAnalysis",
|
||||||
"nif:anchorOf": "Microsoft",
|
"prov:used": [
|
||||||
"me:references": "http://dbpedia.org/page/Microsoft",
|
{
|
||||||
"prov:wasGeneratedBy": "me:NER1"
|
"name": "marl:maxPolarityValue",
|
||||||
|
"prov:value": "1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "marl:minPolarityValue",
|
||||||
|
"prov:value": "0"
|
||||||
|
}
|
||||||
|
]
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"@id": "http://micro.blog/status1#char=25,37",
|
"@id": "_:SgAnalysis1_Activity",
|
||||||
"nif:beginIndex": 25,
|
"prov:wasAssociatedWith": "me:SgAnalysis1",
|
||||||
"nif:endIndex": 37,
|
"@type": "me:SuggestionAnalysis"
|
||||||
"nif:anchorOf": "Windows Phone",
|
},
|
||||||
"me:references": "http://dbpedia.org/page/Windows_Phone",
|
|
||||||
"prov:wasGeneratedBy": "me:NER1"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"suggestions": [
|
|
||||||
{
|
{
|
||||||
"@id": "http://micro.blog/status1#char=16,77",
|
"@id": "_:EmotionAnalysis1_Activity",
|
||||||
"nif:beginIndex": 16,
|
"@type": "me:EmotionAnalysis",
|
||||||
"nif:endIndex": 77,
|
"prov:wasAssociatedWith": "me:EmotionAnalysis1"
|
||||||
"nif:anchorOf": "put your Windows Phone on your newest #open technology program",
|
},
|
||||||
"prov:wasGeneratedBy": "me:SgAnalysis1"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"sentiments": [
|
|
||||||
{
|
{
|
||||||
"@id": "http://micro.blog/status1#char=80,97",
|
"@id": "_:NER1_Activity",
|
||||||
"nif:beginIndex": 80,
|
"@type": "me:NER",
|
||||||
"nif:endIndex": 97,
|
"prov:wasAssociatedWith": "me:EmotionNER1"
|
||||||
"nif:anchorOf": "You'll be awesome.",
|
|
||||||
"marl:hasPolarity": "marl:Positive",
|
|
||||||
"marl:polarityValue": 0.9,
|
|
||||||
"prov:wasGeneratedBy": "me:SAnalysis1"
|
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"emotions": [
|
"entries": [
|
||||||
{
|
{
|
||||||
"@id": "http://micro.blog/status1#char=0,109",
|
"@id": "http://micro.blog/status1",
|
||||||
"nif:anchorOf": "Dear Microsoft, put your Windows Phone on your newest #open technology program. You'll be awesome. #opensource",
|
"@type": [
|
||||||
"prov:wasGeneratedBy": "me:EAnalysis1",
|
"nif:RFC5147String",
|
||||||
"onyx:hasEmotion": [
|
"nif:Context"
|
||||||
{
|
],
|
||||||
"onyx:hasEmotionCategory": "wna:liking"
|
"nif:isString": "Dear Microsoft, put your Windows Phone on your newest #open technology program. You'll be awesome. #opensource",
|
||||||
},
|
"entities": [
|
||||||
{
|
{
|
||||||
"onyx:hasEmotionCategory": "wna:excitement"
|
"@id": "http://micro.blog/status1#char=5,13",
|
||||||
}
|
"nif:beginIndex": 5,
|
||||||
]
|
"nif:endIndex": 13,
|
||||||
|
"nif:anchorOf": "Microsoft",
|
||||||
|
"me:references": "http://dbpedia.org/page/Microsoft",
|
||||||
|
"prov:wasGeneratedBy": "me:NER1"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"@id": "http://micro.blog/status1#char=25,37",
|
||||||
|
"nif:beginIndex": 25,
|
||||||
|
"nif:endIndex": 37,
|
||||||
|
"nif:anchorOf": "Windows Phone",
|
||||||
|
"me:references": "http://dbpedia.org/page/Windows_Phone",
|
||||||
|
"prov:wasGeneratedBy": "me:NER1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"suggestions": [
|
||||||
|
{
|
||||||
|
"@id": "http://micro.blog/status1#char=16,77",
|
||||||
|
"nif:beginIndex": 16,
|
||||||
|
"nif:endIndex": 77,
|
||||||
|
"nif:anchorOf": "put your Windows Phone on your newest #open technology program",
|
||||||
|
"prov:wasGeneratedBy": "me:SgAnalysis1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"sentiments": [
|
||||||
|
{
|
||||||
|
"@id": "http://micro.blog/status1#char=80,97",
|
||||||
|
"nif:beginIndex": 80,
|
||||||
|
"nif:endIndex": 97,
|
||||||
|
"nif:anchorOf": "You'll be awesome.",
|
||||||
|
"marl:hasPolarity": "marl:Positive",
|
||||||
|
"marl:polarityValue": 0.9,
|
||||||
|
"prov:wasGeneratedBy": "me:SAnalysis1"
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"emotions": [
|
||||||
|
{
|
||||||
|
"@id": "http://micro.blog/status1#char=0,109",
|
||||||
|
"nif:anchorOf": "Dear Microsoft, put your Windows Phone on your newest #open technology program. You'll be awesome. #opensource",
|
||||||
|
"prov:wasGeneratedBy": "me:EAnalysis1",
|
||||||
|
"onyx:hasEmotion": [
|
||||||
|
{
|
||||||
|
"onyx:hasEmotionCategory": "wna:liking"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"onyx:hasEmotionCategory": "wna:excitement"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,16 @@
|
|||||||
|
{
|
||||||
|
"$schema": "http://json-schema.org/draft-04/schema#",
|
||||||
|
"description": "Parameters for a senpy analysis",
|
||||||
|
"type": "object",
|
||||||
|
"properties": {
|
||||||
|
"name": {
|
||||||
|
"type": "string",
|
||||||
|
"description": "Name of the parameter"
|
||||||
|
},
|
||||||
|
"prov:value": {
|
||||||
|
"@type": "any",
|
||||||
|
"description": "Value of the parameter"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"required": ["name", "prov:value"]
|
||||||
|
}
|
Loading…
Reference in New Issue