wipo-gbd-transformation 1.1.54__py3-none-any.whl → 1.1.55__py3-none-any.whl
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.
Potentially problematic release.
This version of wipo-gbd-transformation might be problematic. Click here for more details.
- gbdtransformation/brands/chtm/filters.py +153 -181
- gbdtransformation/brands/chtm/schema +79 -91
- gbdtransformation/brands/chtm/template.yml +98 -107
- gbdtransformation/brands/natm/__init__.py +2 -3
- gbdtransformation/brands/natm/filters.py +8 -2
- gbdtransformation/brands/notm/__init__.py +5 -0
- gbdtransformation/brands/notm/filters.py +117 -0
- gbdtransformation/brands/notm/template.yml +165 -0
- gbdtransformation/brands/phtm/schema +79 -50
- gbdtransformation/brands/phtm/schema.classic +50 -0
- gbdtransformation/brands/phtm/template.classic.yml +102 -0
- gbdtransformation/brands/phtm/template.yml +1 -102
- gbdtransformation/brands/xxxx/template.yml +1 -1
- gbdtransformation/designs/woid/filters.py +11 -2
- gbdtransformation/execs-nico.py +709 -0
- gbdtransformation/execs.py +9 -4
- gbdtransformation/gbd-transform.exec.tgz +0 -0
- {wipo_gbd_transformation-1.1.54.dist-info → wipo_gbd_transformation-1.1.55.dist-info}/METADATA +5 -3
- {wipo_gbd_transformation-1.1.54.dist-info → wipo_gbd_transformation-1.1.55.dist-info}/RECORD +24 -21
- {wipo_gbd_transformation-1.1.54.dist-info → wipo_gbd_transformation-1.1.55.dist-info}/WHEEL +1 -1
- gbdtransformation/designs/bgid/__init__.py +0 -5
- gbdtransformation/designs/bgid/filters.py +0 -91
- gbdtransformation/designs/bgid/schema +0 -106
- gbdtransformation/designs/bgid/template.yml +0 -169
- {wipo_gbd_transformation-1.1.54.dist-info → wipo_gbd_transformation-1.1.55.dist-info}/LICENSE.md +0 -0
- {wipo_gbd_transformation-1.1.54.dist-info → wipo_gbd_transformation-1.1.55.dist-info}/SOURCES_Stefans-Mac-Studio.local_Sep-18-063455-2024_Conflict.txt +0 -0
- {wipo_gbd_transformation-1.1.54.dist-info → wipo_gbd_transformation-1.1.55.dist-info}/entry_points.txt +0 -0
- {wipo_gbd_transformation-1.1.54.dist-info → wipo_gbd_transformation-1.1.55.dist-info}/top_level.txt +0 -0
|
@@ -1,183 +1,155 @@
|
|
|
1
1
|
import re
|
|
2
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
|
-
if
|
|
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
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
if len(correspondence): return correspondence[0]
|
|
157
|
-
|
|
158
|
-
def translate_status(status, deld):
|
|
159
|
-
if deld: return 'Ended'
|
|
160
|
-
if status == '0': return 'Pending'
|
|
161
|
-
if status == '1': return 'Registered'
|
|
162
|
-
|
|
163
|
-
raise Exception('Status "%s" unmapped' % status)
|
|
164
|
-
|
|
165
|
-
def translate_feature(feature, marart):
|
|
166
|
-
if feature == '1': return 'Word'
|
|
167
|
-
if feature == '2': return 'Figurative'
|
|
168
|
-
if feature == '3': return 'Combined'
|
|
169
|
-
if feature == '4':
|
|
170
|
-
if not marart: return 'Undefined'
|
|
171
|
-
# we do not support multi-value
|
|
172
|
-
# for features. take the first one
|
|
173
|
-
if isinstance(marart.marartn, list):
|
|
174
|
-
marart.marartn = marart.marartn.pop()
|
|
175
|
-
if marart.marartn == '10': return 'Sound'
|
|
176
|
-
if marart.marartn == '11': return 'Three dimensional'
|
|
177
|
-
if marart.marartn == '12': return 'Colour'
|
|
178
|
-
if marart.marartn == '14': return 'Motion'
|
|
179
|
-
if marart.marartn == '15': return 'Position'
|
|
180
|
-
if marart.marartn == '16': return 'Hologram'
|
|
181
|
-
|
|
182
|
-
raise Exception('Feature "%s" unmapped' % feature)
|
|
183
|
-
|
|
3
|
+
# namespaces defined in XML and to be ignored in procecssing
|
|
4
|
+
ignore_namespace = [
|
|
5
|
+
'http://www.wipo.int/standards/XMLSchema/ST96/Common',
|
|
6
|
+
'http://www.oasis-open.org/tables/exchange/1.0',
|
|
7
|
+
'http://www.wipo.int/standards/XMLSchema/ST96/Trademark',
|
|
8
|
+
'http://www.w3.org/2001/XMLSchema-instance',
|
|
9
|
+
'urn:ige:schema:xsd:st96trademarksuperset-1.0.0'
|
|
10
|
+
]
|
|
11
|
+
|
|
12
|
+
def translate_kind(kind):
|
|
13
|
+
if not kind: return ['Individual']
|
|
14
|
+
|
|
15
|
+
if kind == 'Individual mark': return ['Individual']
|
|
16
|
+
if kind == 'Collective mark': return ['Collective']
|
|
17
|
+
|
|
18
|
+
return 'Unknown'
|
|
19
|
+
#raise Exception('kind "%s" is not mapped.' % kind)
|
|
20
|
+
|
|
21
|
+
def translate_status(status):
|
|
22
|
+
if not status: return 'Ended'
|
|
23
|
+
|
|
24
|
+
if status in ['Registered',
|
|
25
|
+
'Registration published']:
|
|
26
|
+
return 'Registered'
|
|
27
|
+
|
|
28
|
+
if status in ['Application published',
|
|
29
|
+
'Application filed',
|
|
30
|
+
'Application opposed',
|
|
31
|
+
'Application accepted']:
|
|
32
|
+
return 'Pending'
|
|
33
|
+
|
|
34
|
+
if status in ['Application refused',
|
|
35
|
+
'Registration cancelled',
|
|
36
|
+
'Application cancelled']:
|
|
37
|
+
return 'Ended'
|
|
38
|
+
|
|
39
|
+
return 'Unknown'
|
|
40
|
+
#raise Exception('Status "%s" unmapped' % status)
|
|
41
|
+
|
|
42
|
+
def translate_feature(feature):
|
|
43
|
+
"""translation of mark feature"""
|
|
44
|
+
if not feature: return 'Undefined'
|
|
45
|
+
feature = feature.upper()
|
|
46
|
+
if feature == 'COMBINED': return 'Combined'
|
|
47
|
+
if feature == 'WORD': return 'Word'
|
|
48
|
+
if feature == 'STYLIZED CHARACTERS': return 'Stylized characters'
|
|
49
|
+
if feature == 'FIGURATIVE': return 'Figurative'
|
|
50
|
+
if feature == 'SOUND': return 'Sound'
|
|
51
|
+
if feature == '_3_D': return 'Three dimensional'
|
|
52
|
+
if feature == '3-D': return 'Three dimensional'
|
|
53
|
+
if feature == 'THREE DIMENSIONAL': return 'Three dimensional'
|
|
54
|
+
if feature == 'POSITION': return 'Position'
|
|
55
|
+
if feature == 'HOLOGRAM': return 'Hologram'
|
|
56
|
+
if feature == 'TRACER': return 'Tracer'
|
|
57
|
+
if feature == 'PATTERN': return 'Pattern'
|
|
58
|
+
if feature == 'OLFACTORY': return 'Olfactory'
|
|
59
|
+
if feature == 'MULTIMEDIA': return 'Multimedia'
|
|
60
|
+
if feature == 'MOTION': return 'Motion'
|
|
61
|
+
return 'Unknown'
|
|
62
|
+
|
|
63
|
+
#return feature.lower().capitalize()
|
|
64
|
+
# raise Exception to recognize unmapped values
|
|
65
|
+
#raise Exception('Feature "%s" unmapped' % feature)
|
|
66
|
+
|
|
67
|
+
def get_registration_nb(trademark, tmstatus):
|
|
68
|
+
if trademark.RegistrationNumber:
|
|
69
|
+
return trademark.RegistrationNumber
|
|
70
|
+
|
|
71
|
+
# default registration number to application number
|
|
72
|
+
# in case none is provided
|
|
73
|
+
if tmstatus in ['Registered', 'Expired']:
|
|
74
|
+
return trademark.ApplicationNumber.ApplicationNumberText
|
|
75
|
+
|
|
76
|
+
def get_goods_services(goods_services):
|
|
77
|
+
nc_gs = {} # classified
|
|
78
|
+
if not goods_services:
|
|
79
|
+
goods_services = []
|
|
80
|
+
|
|
81
|
+
if not isinstance(goods_services, list):
|
|
82
|
+
goods_services = [goods_services]
|
|
83
|
+
|
|
84
|
+
for goods_service in goods_services:
|
|
85
|
+
code = goods_service.ClassNumber
|
|
86
|
+
if code and not code == '0':
|
|
87
|
+
nc_gs[code] = {}
|
|
88
|
+
desc = goods_service.GoodsServicesDescription
|
|
89
|
+
|
|
90
|
+
if hasattr(desc, '__value'):
|
|
91
|
+
terms = desc.__value
|
|
92
|
+
else:
|
|
93
|
+
terms = desc
|
|
94
|
+
|
|
95
|
+
if terms:
|
|
96
|
+
nc_gs[code]['terms'] = terms
|
|
97
|
+
else:
|
|
98
|
+
continue
|
|
99
|
+
|
|
100
|
+
if hasattr(desc, '_languageCode'):
|
|
101
|
+
lang = desc._languageCode
|
|
102
|
+
nc_gs[code]['lang'] = lang.lower()
|
|
103
|
+
|
|
104
|
+
return nc_gs
|
|
105
|
+
|
|
106
|
+
def get_entity_addr(addr):
|
|
107
|
+
if not addr: return None
|
|
108
|
+
return "%s %s %s" % (addr.AddressStreet, addr.AddressCity, addr.AddressPostcode)
|
|
109
|
+
def get_entity_name(name):
|
|
110
|
+
if not name: return
|
|
111
|
+
if name.OrganizationName: return name.OrganizationName
|
|
112
|
+
return "%s %s" % (name.FirstName, name.LastName )
|
|
113
|
+
def get_entity_kind(name):
|
|
114
|
+
if not name: return
|
|
115
|
+
if name.OrganizationName: return 'Legal entity'
|
|
116
|
+
return 'Natural person'
|
|
117
|
+
|
|
118
|
+
def get_full_address(postalStructuredAddress):
|
|
119
|
+
if "AddressLineText" not in postalStructuredAddress:
|
|
120
|
+
return
|
|
121
|
+
result = ""
|
|
122
|
+
first = True
|
|
123
|
+
for addressLineText in postalStructuredAddress["AddressLineText"]:
|
|
124
|
+
if hasattr(addressLineText, '__value'):
|
|
125
|
+
if first:
|
|
126
|
+
first = False
|
|
127
|
+
else:
|
|
128
|
+
result += ", "
|
|
129
|
+
result += addressLineText.__value
|
|
130
|
+
if len(result) == 0:
|
|
131
|
+
return
|
|
132
|
+
else:
|
|
133
|
+
return result.strip()
|
|
134
|
+
|
|
135
|
+
def select_priority_date(priority):
|
|
136
|
+
if priority == None:
|
|
137
|
+
return None
|
|
138
|
+
if "PriorityApplicationFilingDate" in priority:
|
|
139
|
+
return priority["PriorityApplicationFilingDate"]
|
|
140
|
+
elif "PriorityRegistrationDate" in priority:
|
|
141
|
+
return priority["PriorityRegistrationDate"]
|
|
142
|
+
else:
|
|
143
|
+
return None
|
|
144
|
+
|
|
145
|
+
def clean_verbal_element(element_text):
|
|
146
|
+
if element_text == None:
|
|
147
|
+
return None
|
|
148
|
+
element_text = element_text.replace("((fig.))", "")
|
|
149
|
+
return element_text.strip()
|
|
150
|
+
|
|
151
|
+
def local_guess_language(content):
|
|
152
|
+
if content == None:
|
|
153
|
+
return None
|
|
154
|
+
from langdetect import detect
|
|
155
|
+
return detect(content)
|
|
@@ -1,91 +1,79 @@
|
|
|
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
|
-
______/prirem
|
|
81
|
-
____/regadr
|
|
82
|
-
______/addrrole
|
|
83
|
-
______/nameadd
|
|
84
|
-
________/addrl
|
|
85
|
-
__________/addrll
|
|
86
|
-
________/namel
|
|
87
|
-
__________/namell
|
|
88
|
-
________/nat
|
|
89
|
-
________/plainco
|
|
90
|
-
____/renewalgr
|
|
91
|
-
______/renewalt
|
|
1
|
+
/Trademark
|
|
2
|
+
__/ApplicantBag
|
|
3
|
+
____/Applicant
|
|
4
|
+
______/Contact
|
|
5
|
+
________/Name
|
|
6
|
+
__________/PersonName
|
|
7
|
+
____________/PersonFullName
|
|
8
|
+
________/PostalAddressBag
|
|
9
|
+
__________/PostalAddress
|
|
10
|
+
____________/PostalStructuredAddress
|
|
11
|
+
______________/AddressLineText
|
|
12
|
+
______________/AddressLineText[@sequenceNumber=1]
|
|
13
|
+
______________/CountryCode
|
|
14
|
+
______/LegalEntityName
|
|
15
|
+
__/ApplicationDate
|
|
16
|
+
__/ApplicationNumber
|
|
17
|
+
____/ApplicationNumberText
|
|
18
|
+
__/CHMarkCategory
|
|
19
|
+
__/ExpiryDate
|
|
20
|
+
__/GoodsServicesBag
|
|
21
|
+
____/GoodsServices
|
|
22
|
+
______/ClassDescriptionBag
|
|
23
|
+
________/ClassDescription
|
|
24
|
+
__________/ClassNumber
|
|
25
|
+
__________/GoodsServicesDescriptionText
|
|
26
|
+
______/GoodsServicesClassificationBag
|
|
27
|
+
________/GoodsServicesClassification
|
|
28
|
+
__________/ClassNumber
|
|
29
|
+
__________/ClassificationKindCode
|
|
30
|
+
__/MarkCategory
|
|
31
|
+
__/MarkCurrentStatusCode
|
|
32
|
+
__/MarkRepresentation
|
|
33
|
+
____/MarkFeatureCategory
|
|
34
|
+
____/MarkReproduction
|
|
35
|
+
______/MarkImageBag
|
|
36
|
+
________/MarkImage
|
|
37
|
+
__________/FileName
|
|
38
|
+
__________/MarkImageColourClaimedText
|
|
39
|
+
______/WordMarkSpecification
|
|
40
|
+
________/MarkSignificantVerbalElementText
|
|
41
|
+
__/PriorityBag
|
|
42
|
+
____/Priority
|
|
43
|
+
______/PriorityApplicationFilingDate
|
|
44
|
+
______/PriorityCountryCode
|
|
45
|
+
______/PriorityRegistrationDate
|
|
46
|
+
______/PriorityRegistrationNumber
|
|
47
|
+
__/PublicationBag
|
|
48
|
+
____/Publication
|
|
49
|
+
______/NationalPublication
|
|
50
|
+
________/PublicationCategoryText
|
|
51
|
+
________/PublicationStatusCategory
|
|
52
|
+
________/RegistrationChangeBag
|
|
53
|
+
__________/RegistrationChange
|
|
54
|
+
____________/ChangeDescriptionText
|
|
55
|
+
____________/ChangeText
|
|
56
|
+
______/PublicationDate
|
|
57
|
+
______/PublicationIdentifier
|
|
58
|
+
______/PublicationIdentifier[@officeCode=CH]
|
|
59
|
+
______/PublicationPage
|
|
60
|
+
__/RegistrationDate
|
|
61
|
+
__/RegistrationNumber
|
|
62
|
+
__/RegistrationOfficeCode
|
|
63
|
+
__/RepresentativeBag
|
|
64
|
+
____/Representative
|
|
65
|
+
______/Contact
|
|
66
|
+
________/Name
|
|
67
|
+
__________/PersonName
|
|
68
|
+
____________/PersonFullName
|
|
69
|
+
________/PostalAddressBag
|
|
70
|
+
__________/PostalAddress
|
|
71
|
+
____________/PostalStructuredAddress
|
|
72
|
+
______________/AddressLineText
|
|
73
|
+
______________/AddressLineText[@sequenceNumber=1]
|
|
74
|
+
______________/CountryCode
|
|
75
|
+
______/LegalEntityName
|
|
76
|
+
__/TradeDistinctivenessIndicator
|
|
77
|
+
__/Version
|
|
78
|
+
____/VersionDateTime
|
|
79
|
+
______________________________/TrademarkApplicationType_V7_1.xsd]
|