-
Notifications
You must be signed in to change notification settings - Fork 1
/
schema.json
137 lines (136 loc) · 3.61 KB
/
schema.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
{
"$schema": "http://json-schema.org/draft-04/schema#",
"title": "Response",
"description": "A senpy response",
"type": "object",
"properties": {
"@context": {
"$ref": "#/definitions/Context"
},
"@id": {
"description": "ID of the analysis",
"type": "string"
},
"analysis": {
"type": ["array"],
"items": {
"$ref": "#/definitions/Analysis"
}
},
"entries": {
"$ref": "#/definitions/Entry"
}
},
"required": ["@id", "analysis", "entries"],
"definitions": {
"Context": {
"description": "JSON-LD Context",
"type": ["array", "string", "object"]
},
"Analysis": {
"description": "Senpy analysis",
"type": "object",
"properties": {
"@id": {
"type": "string"
},
"@type": {
"type": "string",
"description": "Type of the analysis. e.g. marl:SentimentAnalysis"
}
},
"required": ["@id", "@type"]
},
"Entry": {
"properties": {
"@id": {
"type": "string"
},
"@type": {
"enum": [["nif:RFC5147String", "nif:Context"]]
},
"nif:isString": {
"description": "String contained in this Context",
"type": "string"
},
"sentiments": {
"type": "array",
"items": {"$ref": "#/definitions/Sentiment" }
},
"emotions": {
"type": "array",
"items": {"$ref": "#/definitions/EmotionSet" }
},
"entities": {
"type": "array",
"items": {"$ref": "#/definitions/Entity" }
},
"topics": {
"type": "array",
"items": {"$ref": "#/definitions/Topic" }
},
"suggestions": {
"type": "array",
"items": {"$ref": "#/definitions/Suggestion" }
}
},
"required": ["@id", "@type", "nif:isString"]
},
"Sentiment": {
"properties": {
"@id": {"type": "string"},
"nif:beginIndex": {"type": "integer"},
"nif:endIndex": {"type": "integer"},
"nif:anchorOf": {
"description": "Piece of context that contains the Sentiment",
"type": "string"
},
"marl:hasPolarity": {
"enum": ["marl:Positive", "marl:Negative", "marl:Neutral"]
},
"marl:polarityValue": {
"type": "number"
},
"prov:wasGeneratedBy": {
"type": "string",
"description": "The ID of the analysis that generated this Sentiment. The full object should be included in the \"analysis\" property of the root object"
}
},
"required": ["id", "nif:anchorOf"]
},
"EmotionSet": {
"properties": {
"@id": {"type": "string"},
"nif:beginIndex": {"type": "int"},
"nif:endIndex": {"type": "int"},
"nif:anchorOf": {
"description": "Piece of context that contains the Sentiment",
"type": "string"
},
"marl:hasPolarity": {
"enum": ["marl:Positive", "marl:Negative", "marl:Neutral"]
},
"marl:polarityValue": {
"type": "number"
},
"prov:wasGeneratedBy": {
"type": "string",
"description": "The ID of the analysis that generated this Sentiment. The full object should be included in the \"analysis\" property of the root object"
}
},
"required": ["id", "nif:isString"]
},
"EmotionSet": {
"type": "object"
},
"Entity": {
"type": "object"
},
"Topic": {
"type": "object"
},
"Suggestion": {
"type": "object"
}
}
}