reflexive 1.0.20__tar.gz → 1.1.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {reflexive-1.0.20/reflexive.egg-info → reflexive-1.1.1}/PKG-INFO +2 -2
- {reflexive-1.0.20 → reflexive-1.1.1}/reflexive/visualise.py +23 -19
- {reflexive-1.0.20 → reflexive-1.1.1/reflexive.egg-info}/PKG-INFO +2 -2
- {reflexive-1.0.20 → reflexive-1.1.1}/setup.cfg +1 -1
- {reflexive-1.0.20 → reflexive-1.1.1}/LICENSE +0 -0
- {reflexive-1.0.20 → reflexive-1.1.1}/LICENSE.txt +0 -0
- {reflexive-1.0.20 → reflexive-1.1.1}/MANIFEST.in +0 -0
- {reflexive-1.0.20 → reflexive-1.1.1}/README.md +0 -0
- {reflexive-1.0.20 → reflexive-1.1.1}/pyproject.toml +0 -0
- {reflexive-1.0.20 → reflexive-1.1.1}/reflexive/__init__.py +0 -0
- {reflexive-1.0.20 → reflexive-1.1.1}/reflexive/analyse.py +0 -0
- {reflexive-1.0.20 → reflexive-1.1.1}/reflexive/cfg.py +0 -0
- {reflexive-1.0.20 → reflexive-1.1.1}/reflexive/session.py +0 -0
- {reflexive-1.0.20 → reflexive-1.1.1}/reflexive/util.py +0 -0
- {reflexive-1.0.20 → reflexive-1.1.1}/reflexive.egg-info/SOURCES.txt +0 -0
- {reflexive-1.0.20 → reflexive-1.1.1}/reflexive.egg-info/dependency_links.txt +0 -0
- {reflexive-1.0.20 → reflexive-1.1.1}/reflexive.egg-info/top_level.txt +0 -0
- {reflexive-1.0.20 → reflexive-1.1.1}/tests/test_reflexive.py +0 -0
|
@@ -7,25 +7,29 @@ class Display:
|
|
|
7
7
|
|
|
8
8
|
defaults = {
|
|
9
9
|
"priority_tags": [
|
|
10
|
-
"
|
|
10
|
+
"NR",
|
|
11
11
|
"AR",
|
|
12
12
|
"RR",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"EA"
|
|
13
|
+
"EP",
|
|
14
|
+
"AF",
|
|
15
|
+
"TE",
|
|
17
16
|
],
|
|
18
17
|
"colours": {
|
|
19
|
-
"
|
|
20
|
-
"AR": "#
|
|
21
|
-
"RR": "#
|
|
22
|
-
"
|
|
23
|
-
"
|
|
24
|
-
"
|
|
25
|
-
"EA":"#d9f2f2"
|
|
18
|
+
"NR": "#ED1B23",
|
|
19
|
+
"AR": "#00A64F",
|
|
20
|
+
"RR": "#00AEEF",
|
|
21
|
+
"EP": "#FFF200",
|
|
22
|
+
"AF": "#EC008C",
|
|
23
|
+
"TE":"#f7f7d4",
|
|
26
24
|
}
|
|
27
25
|
}
|
|
28
26
|
|
|
27
|
+
#FFF200 yellow
|
|
28
|
+
#EC008C magenta
|
|
29
|
+
#00AEEF cyan
|
|
30
|
+
#00A64F green
|
|
31
|
+
#ED1B23 red
|
|
32
|
+
|
|
29
33
|
# "VR_ER": "#ff6644", #Orange
|
|
30
34
|
# "AR": "#00cc00", #Green
|
|
31
35
|
# "RR": "#6699ff", #Blue
|
|
@@ -139,11 +143,11 @@ class Display:
|
|
|
139
143
|
if rr['Score']>0.5:
|
|
140
144
|
ent_type = rr['Type']
|
|
141
145
|
if ent_type in ['VR','ER']:
|
|
142
|
-
label = "
|
|
146
|
+
label = "NR"
|
|
143
147
|
elif ent_type in ['EP','EV']:
|
|
144
|
-
label = "
|
|
148
|
+
label = "EP"
|
|
145
149
|
elif ent_type in ['CN','AF']:
|
|
146
|
-
label = "
|
|
150
|
+
label = "AF"
|
|
147
151
|
else:
|
|
148
152
|
label = ent_type
|
|
149
153
|
new_rrs.setdefault(label,[]).append((rr['BeginOffset'],rr['EndOffset']))
|
|
@@ -154,10 +158,10 @@ class Display:
|
|
|
154
158
|
for sr in syntax_results:
|
|
155
159
|
pos = sr['PartOfSpeech']
|
|
156
160
|
if pos['Score']>0.99:
|
|
157
|
-
if pos['Tag'] in ['NOUN','ADJ']:
|
|
158
|
-
offsets.setdefault("
|
|
159
|
-
if pos['Tag'] in ['ADV','VERB']:
|
|
160
|
-
|
|
161
|
+
if pos['Tag'] in ['NOUN','ADJ']: # TE - Topic Entity
|
|
162
|
+
offsets.setdefault("TE",[]).append((sr['BeginOffset'],sr['EndOffset']))
|
|
163
|
+
# if pos['Tag'] in ['ADV','VERB']:
|
|
164
|
+
# offsets.setdefault("EA",[]).append((sr['BeginOffset'],sr['EndOffset']))
|
|
161
165
|
return self.concatenate_offsets(offsets)
|
|
162
166
|
|
|
163
167
|
def concatenate_offsets(self,offsets:dict):
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|