-
Notifications
You must be signed in to change notification settings - Fork 0
/
rules.yaml
140 lines (139 loc) · 4.53 KB
/
rules.yaml
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
138
139
140
prefixes:
ex: "http://www.semanticweb.org/elisabetta&filippo/ontologies/2021/4/SemScript#"
xsd: "http://www.w3.org/2001/XMLSchema#"
mappings:
scene:
sources:
- ['movies/marriage_story.json~jsonpath', '[*].content[*]']
s: ex:scene_$(scene_number)
po:
- p: ex:scene_number
o:
value: $(scene_number)
datatype: xsd:integer
- p: ex:location
o:
value: $(scene_info.location)
datatype: xsd:string
- p: ex:region
o:
value: $(scene_info.region)
datatype: xsd:string
- p: ex:time
o:
value: $(scene_info.time)
datatype: xsd:string
scene2:
sources:
- ['movies/marriage_story.json~jsonpath', '$[*]']
s: ex:scene_$(content[*].scene_number)
po:
- p: ex:page
o:
value: $(page)
datatype: xsd:integer
scene3:
sources:
- ['movies/marriage_story.json~jsonpath', '$[*]']
s: ex:scene_$(content[*].scene_number)
po:
- [a, ex:Scene]
action_scene:
sources:
- ['movies/marriage_story.json~jsonpath', '$[*].content[*].scene[*].content[*]']
po:
- p: ex:actionDescription
o:
value: $(text)
datatype: xsd:string
transition_scene:
sources:
- ['movies/marriage_story.json~jsonpath', '$[*].content[*].scene[*]']
po:
- p: ex:transitionDescription
o:
value: $(content.text)
datatype: xsd:string
character:
sources:
- ['movies/marriage_story.json~jsonpath', '$[*].content[*].scene[*]']
s: ex:$(content.character)
po:
- p: ex:hasName
o:
value: $(content.character)
datatype: xsd:string
- p: ex:says
o:
value: $(content.dialogue)
datatype: xsd:string
- p: ex:hasModifier
o:
value: $(content.modifier)
datatype: xsd:string
character1:
sources:
- ['movies/marriage_story.json~jsonpath', '$[*].content[*].scene[*]']
s: ex:$(content.character1.character.character)
po:
- p: ex:hasName
o:
value: $(content.character1.character.character)
datatype: xsd:string
- p: ex:says
o:
value: $(content.character1.character.dialogue)
datatype: xsd:string
- p: ex:hasModifier
o:
value: $(content.character1.character.modifier)
datatype: xsd:string
character2:
sources:
- ['movies/marriage_story.json~jsonpath', '$[*].content[*].scene[*]']
s: ex:$(content.character2.character.character)
po:
- p: ex:hasName
o:
value: $(content.character2.character.character)
datatype: xsd:string
- p: ex:says
o:
value: $(content.character2.character.dialogue)
datatype: xsd:string
- p: ex:hasModifier
o:
value: $(content.character2.character.modifier)
datatype: xsd:string
character_scene:
sources:
- ['movies/marriage_story.json~jsonpath', '$[*].content[*].scene[*]']
po:
- p: ex:hasActor
o:
- mapping: character
condition:
function: equal
parameters:
- [str1, $(content.character)]
- [str2, $(content.character)]
dual_dialogue_scene:
sources:
- ['movies/marriage_story.json~jsonpath', '$[*].content[*].scene[*]']
po:
- p: ex:hasActor1
o:
- mapping: character1
condition:
function: equal
parameters:
- [str1, $(content.character1.character.character)]
- [str2, $(content.character1.character.character)]
- p: ex:hasActor2
o:
- mapping: character2
condition:
function: equal
parameters:
- [str1, $(content.character2.character.character)]
- [str2, $(content.character2.character.character)]