wipo-gbd-transformation 1.1.46__py3-none-any.whl → 1.1.59__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.

Files changed (139) hide show
  1. gbdtransformation/brands/attm/template.yml +1 -2
  2. gbdtransformation/brands/bgtm/template.yml +1 -1
  3. gbdtransformation/brands/catm/filters.py +2 -1
  4. gbdtransformation/brands/catm/template.yml +10 -6
  5. gbdtransformation/brands/chtm/filters.py +159 -181
  6. gbdtransformation/brands/chtm/schema +79 -91
  7. gbdtransformation/brands/chtm/template.yml +97 -106
  8. gbdtransformation/brands/eetm/template.yml +1 -1
  9. gbdtransformation/brands/emtm/template.yml +1 -1
  10. gbdtransformation/brands/estm/template.yml +1 -1
  11. gbdtransformation/brands/frtm/template.yml +1 -1
  12. gbdtransformation/brands/gdtm/__init__.py +5 -0
  13. gbdtransformation/brands/gdtm/filters.py +61 -0
  14. gbdtransformation/brands/gdtm/schema +87 -0
  15. gbdtransformation/brands/gdtm/template.yml +1 -0
  16. gbdtransformation/brands/gdtm/tests/__init__.py +0 -0
  17. gbdtransformation/brands/istm/filters.py +21 -11
  18. gbdtransformation/brands/istm/template.yml +1 -1
  19. gbdtransformation/brands/krtm/template.yml +1 -1
  20. gbdtransformation/brands/lktm/__init__.py +5 -0
  21. gbdtransformation/brands/lktm/filters.py +83 -0
  22. gbdtransformation/brands/lktm/schema +87 -0
  23. gbdtransformation/brands/lktm/template.yml +1 -0
  24. gbdtransformation/brands/lktm/tests/__init__.py +0 -0
  25. gbdtransformation/brands/natm/__init__.py +2 -3
  26. gbdtransformation/brands/natm/filters.py +8 -2
  27. gbdtransformation/brands/notm/__init__.py +5 -0
  28. gbdtransformation/brands/notm/filters.py +113 -0
  29. gbdtransformation/brands/notm/template.yml +152 -0
  30. gbdtransformation/brands/nztm/template.yml +1 -1
  31. gbdtransformation/brands/pgtm/filters.py +1 -0
  32. gbdtransformation/brands/phtm/schema +79 -50
  33. gbdtransformation/brands/phtm/schema.classic +50 -0
  34. gbdtransformation/brands/phtm/template.classic.yml +102 -0
  35. gbdtransformation/brands/phtm/template.yml +1 -102
  36. gbdtransformation/brands/qatm/__init__.py +5 -0
  37. gbdtransformation/brands/qatm/filters.py +81 -0
  38. gbdtransformation/brands/qatm/schema +87 -0
  39. gbdtransformation/brands/qatm/template.yml +1 -0
  40. gbdtransformation/brands/qatm/tests/__init__.py +0 -0
  41. gbdtransformation/brands/sgtm/filters.py +1 -0
  42. gbdtransformation/brands/sgtm/template.trademark.yml +2 -2
  43. gbdtransformation/brands/ustm/template.yml +1 -1
  44. gbdtransformation/brands/vctm/__init__.py +5 -0
  45. gbdtransformation/brands/vctm/filters.py +75 -0
  46. gbdtransformation/brands/vctm/schema +87 -0
  47. gbdtransformation/brands/vctm/template.yml +1 -0
  48. gbdtransformation/brands/vctm/tests/__init__.py +0 -0
  49. gbdtransformation/brands/vntm/filters.py +1 -3
  50. gbdtransformation/brands/xxxx/template.yml +1 -1
  51. gbdtransformation/designs/__init__.py +8 -0
  52. gbdtransformation/designs/alid/__init__.py +1 -1
  53. gbdtransformation/designs/alid/filters.py +14 -1
  54. gbdtransformation/designs/bnid/__init__.py +5 -0
  55. gbdtransformation/designs/bnid/filters.py +61 -0
  56. gbdtransformation/designs/bnid/schema +80 -0
  57. gbdtransformation/designs/bnid/template.yml +1 -0
  58. gbdtransformation/designs/bwid/__init__.py +6 -0
  59. gbdtransformation/designs/bwid/filters.py +64 -0
  60. gbdtransformation/designs/bwid/schema +101 -0
  61. gbdtransformation/designs/bwid/template.yml +1 -0
  62. gbdtransformation/designs/crid/__init__.py +5 -0
  63. gbdtransformation/designs/crid/filters.py +63 -0
  64. gbdtransformation/designs/crid/schema +94 -0
  65. gbdtransformation/designs/crid/template.yml +1 -0
  66. gbdtransformation/designs/cuid/__init__.py +5 -0
  67. gbdtransformation/designs/cuid/filters.py +60 -0
  68. gbdtransformation/designs/cuid/schema +98 -0
  69. gbdtransformation/designs/cuid/template.yml +1 -0
  70. gbdtransformation/designs/egid/__init__.py +5 -0
  71. gbdtransformation/designs/egid/filters.py +62 -0
  72. gbdtransformation/designs/egid/schema +82 -0
  73. gbdtransformation/designs/egid/template.yml +1 -0
  74. gbdtransformation/designs/filters.py +73 -0
  75. gbdtransformation/designs/idid/__init__.py +5 -0
  76. gbdtransformation/designs/idid/filters.py +67 -0
  77. gbdtransformation/designs/idid/schema +102 -0
  78. gbdtransformation/designs/idid/template.yml +1 -0
  79. gbdtransformation/designs/ipas/filters.py +84 -2
  80. gbdtransformation/designs/ipas/template.yml +90 -79
  81. gbdtransformation/designs/joid/__init__.py +6 -0
  82. gbdtransformation/designs/joid/filters.py +62 -0
  83. gbdtransformation/designs/joid/schema +97 -0
  84. gbdtransformation/designs/joid/template.yml +1 -0
  85. gbdtransformation/designs/keid/__init__.py +5 -0
  86. gbdtransformation/designs/keid/filters.py +62 -0
  87. gbdtransformation/designs/keid/schema +99 -0
  88. gbdtransformation/designs/keid/template.yml +1 -0
  89. gbdtransformation/designs/khid/__init__.py +5 -0
  90. gbdtransformation/designs/khid/filters.py +63 -0
  91. gbdtransformation/designs/khid/schema +100 -0
  92. gbdtransformation/designs/khid/template.yml +1 -0
  93. gbdtransformation/designs/laid/__init__.py +5 -0
  94. gbdtransformation/designs/laid/filters.py +61 -0
  95. gbdtransformation/designs/laid/schema +94 -0
  96. gbdtransformation/designs/laid/template.yml +1 -0
  97. gbdtransformation/designs/mnid/__init__.py +6 -0
  98. gbdtransformation/designs/mnid/filters.py +62 -0
  99. gbdtransformation/designs/mnid/schema +98 -0
  100. gbdtransformation/designs/mnid/template.yml +1 -0
  101. gbdtransformation/designs/myid/__init__.py +5 -0
  102. gbdtransformation/designs/myid/filters.py +60 -0
  103. gbdtransformation/designs/myid/schema +95 -0
  104. gbdtransformation/designs/myid/template.yml +1 -0
  105. gbdtransformation/designs/phid/__init__.py +5 -0
  106. gbdtransformation/designs/phid/filters.py +70 -0
  107. gbdtransformation/designs/phid/schema +95 -0
  108. gbdtransformation/designs/phid/template.yml +1 -0
  109. gbdtransformation/designs/sgid/__init__.py +6 -0
  110. gbdtransformation/designs/sgid/filters.py +66 -0
  111. gbdtransformation/designs/sgid/schema +115 -0
  112. gbdtransformation/designs/sgid/template.yml +1 -0
  113. gbdtransformation/designs/thid/__init__.py +4 -0
  114. gbdtransformation/designs/thid/filters.py +64 -0
  115. gbdtransformation/designs/thid/schema +98 -0
  116. gbdtransformation/designs/thid/template.yml +1 -0
  117. gbdtransformation/designs/tnid/__init__.py +5 -0
  118. gbdtransformation/designs/tnid/filters.py +66 -0
  119. gbdtransformation/designs/tnid/schema +96 -0
  120. gbdtransformation/designs/tnid/template.yml +1 -0
  121. gbdtransformation/designs/vnid/__init__.py +5 -0
  122. gbdtransformation/designs/vnid/filters.py +62 -0
  123. gbdtransformation/designs/vnid/schema +97 -0
  124. gbdtransformation/designs/vnid/template.yml +1 -0
  125. gbdtransformation/designs/woid/__init__.py +2 -0
  126. gbdtransformation/designs/woid/filters.py +372 -0
  127. gbdtransformation/designs/woid/schema +592 -0
  128. gbdtransformation/designs/woid/template.yml +516 -0
  129. gbdtransformation/designs/xxid/template.yml +331 -119
  130. gbdtransformation/execs-nico.py +709 -0
  131. gbdtransformation/execs.py +55 -4
  132. gbdtransformation/gbd-transform.exec.tgz +0 -0
  133. {wipo_gbd_transformation-1.1.46.dist-info → wipo_gbd_transformation-1.1.59.dist-info}/METADATA +4 -1
  134. {wipo_gbd_transformation-1.1.46.dist-info → wipo_gbd_transformation-1.1.59.dist-info}/RECORD +139 -39
  135. wipo_gbd_transformation-1.1.59.dist-info/SOURCES_Stefans-Mac-Studio.local_Sep-18-063455-2024_Conflict.txt +690 -0
  136. {wipo_gbd_transformation-1.1.46.dist-info → wipo_gbd_transformation-1.1.59.dist-info}/entry_points.txt +1 -0
  137. {wipo_gbd_transformation-1.1.46.dist-info → wipo_gbd_transformation-1.1.59.dist-info}/LICENSE.md +0 -0
  138. {wipo_gbd_transformation-1.1.46.dist-info → wipo_gbd_transformation-1.1.59.dist-info}/WHEEL +0 -0
  139. {wipo_gbd_transformation-1.1.46.dist-info → wipo_gbd_transformation-1.1.59.dist-info}/top_level.txt +0 -0
@@ -8,12 +8,11 @@
8
8
 
9
9
  st13: {{ mark.Anmeldenummer | st13("AT", appdate=appyear) }}
10
10
  registrationOfficeCode: AT
11
-
11
+ type: TRADEMARK
12
12
  gbdStatus: {{ gstatus }}
13
13
 
14
14
  {% if not gstatus == 'Delete' %}
15
15
 
16
- type: TRADEMARK
17
16
  kind:
18
17
  - Individual
19
18
  markFeature: {{ feature }}
@@ -7,9 +7,9 @@
7
7
  st13: {{ TradeMark.ApplicationNumber | st13('BG') }}
8
8
  gbdStatus: {{ status }}
9
9
  registrationOfficeCode: BG
10
+ type: TRADEMARK
10
11
 
11
12
  {% if not status == 'Delete' %}
12
- type: TRADEMARK
13
13
  kind: {{ TradeMark.KindMark | translate_kind }}
14
14
  markFeature: {{ TradeMark.MarkFeature | translate_feature }}
15
15
  designatedCountries:
@@ -193,8 +193,9 @@ def translate_feature(feature):
193
193
  if feature == 'Olfactory': return 'Olfactory'
194
194
  if feature == 'Hologram': return 'Hologram'
195
195
  if feature == 'Other': return 'Other'
196
+ if feature == 'Design': return 'Combined'
196
197
 
197
- raise Exception('Feature "%s" unmapped' % feature)
198
+ return 'Unknown'
198
199
 
199
200
  def get_mark_names(word_mark_spec):
200
201
  verbal = word_mark_spec.MarkVerbalElementText
@@ -9,9 +9,9 @@
9
9
  st13: {{ appnum | st13('CA', appdate=trademark.ApplicationDate, type=type) }}
10
10
  gbdStatus: {{ status }}
11
11
  registrationOfficeCode: {{ trademark.RegistrationOfficeCode }}
12
+ type: {{ type }}
12
13
 
13
14
  {% if not status == 'Delete' %}
14
- type: {{ type }}
15
15
  kind:
16
16
  - {{ kind }}
17
17
 
@@ -52,17 +52,21 @@ markDescriptionDetails:
52
52
  text: {{ description.__value }}
53
53
  {% endcall %}
54
54
 
55
- {% call(wspec) match('MarkRepresentation.MarkReproduction.WordMarkSpecification', trademark) %}
55
+
56
56
  wordMarkSpecification:
57
- {% set (verbal, signif) = wspec | get_mark_names %}
57
+ {% call(wspec) match('IndexHeadingBag.IndexHeading', trademark) %}
58
58
  markVerbalElement:
59
- - languageCode: {{ verbal | guess_language(trademark.ApplicationLanguageCode) }}
60
- text: {{ verbal }}
59
+ - languageCode: {{ wspec.IndexHeadingText | guess_language(trademark.ApplicationLanguageCode) }}
60
+ text: {{ wspec.IndexHeadingText }}
61
+ {% endcall %}
62
+ {% call(wspec) match('MarkRepresentation.MarkReproduction.WordMarkSpecification', trademark) %}
63
+ {% set (verbal, signif) = wspec | get_mark_names %}
61
64
  markSignificantVerbalElement:
62
65
  - languageCode: {{ signif | guess_language(trademark.ApplicationLanguageCode) }}
63
66
  text: {{ signif }}
64
67
  markTransliteration: {{ wspec.MarkTransliteration }}
65
- {% endcall %}
68
+ {% endcall %}
69
+
66
70
 
67
71
  markImageDetails:
68
72
  {% call(img) match('MarkRepresentation.MarkReproduction.MarkImageBag.MarkImage', trademark) %}
@@ -1,183 +1,161 @@
1
1
  import re
2
2
 
3
- def get_kind(info):
4
- if info.marart:
5
- nbs = info.marart.marartn
6
-
7
- if not isinstance(nbs, list):
8
- nbs = [nbs]
9
-
10
- for nb in nbs:
11
- if nb == '6':
12
- return ['Collective']
13
-
14
- return ['Individual']
15
-
16
- def get_verbal(info):
17
- if info.markve:
18
- return info.markve
19
-
20
- # or get it from the picture remark
21
- if info.marpicrem:
22
- return info.marpicrem.replace('((fig.))', '')
23
-
24
- def structure_gs(gsgr):
25
- if not gsgr: return {}
26
-
27
- nc = {} # nice classes and eventual goods services
28
- gs = [] # unclassified goods and services
29
-
30
- nice = gsgr.intregg
31
- if not isinstance(nice, list):
32
- nice = [nice]
33
-
34
- # get the nice classes
35
- for n in nice:
36
- nc[n.nicclai] = []
37
-
38
- # get the goods and services
39
- terms = gsgr.gstermt
40
- try:
41
- # terml means unclassified
42
- terms_lines = terms.gsterml
43
- if not isinstance(terms_lines, list):
44
- terms_lines = [terms_lines]
45
-
46
- l = []
47
- for t in terms_lines:
48
- if t:
49
- l += t.split('\n')
50
-
51
- terms_lines = l
52
- except:
53
- # classified (nice class indicated inline)
54
- terms_lines = terms.split('\n') if terms else []
55
- terms_lines = [line.strip() for line in terms_lines if line.strip()]
56
-
57
- nc_gs = gs
58
- for line in terms_lines:
59
- # get the numeric prefix if the line
60
- matches = re.findall(r'^0?(\d+):? (.*)', line)
61
- if len(matches):
62
- # split the class number and the rest of the line
63
- (cls, line) = matches[0]
64
- # try and find the nice class defined before
65
- # if not found, go to unclassified
66
- nc_gs = nc.get(cls, gs)
67
- nc_gs.append(line.strip())
68
-
69
- # join the lines then split on ';'
70
- for cls in nc:
71
- gslines = nc[cls]
72
- if len(gslines):
73
- nc[cls] = [term.strip().rstrip('.') for term in ' '.join(gslines).split(';')]
74
-
75
- return (nc, gs)
76
-
77
- def get_roles(info):
78
- persons = info.regadr
79
-
80
- if not isinstance(persons, list):
81
- persons = [persons]
82
-
83
- matches = {
84
- 'applicants': [],
85
- 'representatives': [],
86
- 'correspondence': None
87
- }
88
-
89
- def _get_person_info(p):
90
- info = {}
91
- nameadd = p.nameadd
92
-
93
- try:
94
- name = nameadd.namel.namell
95
- if isinstance(name, list):
96
- name = list(filter(None, name))
97
- name = ' '.join(name)
98
- except:
99
- name = nameadd.namel
100
-
101
- try:
102
- addr = nameadd.addrl.addrll
103
- if isinstance(addr, list):
104
- addr = list(filter(None, addr))
105
- addr = ', '.join(addr)
106
- except:
107
- addr = nameadd.addrl
108
-
109
- # complete the address with zipcode and city
110
- if nameadd.plainco:
111
- if addr: addr += ', '
112
- else: addr = ''
113
- addr += (nameadd.plainco)
114
-
115
- return {'name': name, 'addr': addr, 'nat': nameadd.nat}
116
-
117
- for p in persons:
118
- role = p.addrrole
119
- if role == '1':
120
- matches['applicants'].append(_get_person_info(p))
121
- elif role == '3':
122
- matches['representatives'].append(_get_person_info(p))
123
- elif role == '11':
124
- matches['correspondence'] = _get_person_info(p)
125
- # Licensee
126
- elif role == '6': continue
127
- # Bankruptcy office
128
- elif role == '7': continue
129
- # Usufructuary
130
- elif role == '8': continue
131
- # Pawnee
132
- elif role == '9': continue
133
- # Collection office
134
- elif role == '10': continue
135
- # Sub-Licensee
136
- elif role == '17': continue
137
- # Limited Licensee
138
- elif role == '19': continue
139
- # Exclusive Licensee
140
- elif role == '20': continue
141
- else:
142
- raise Exception('unindentified role [%s]' % role)
143
-
144
- return matches
145
-
146
- def get_representatives(info):
147
- persons = info.regadr
148
- representatives = [p for p in persons if p.addrrole == '3']
149
-
150
- return representatives
151
-
152
- def get_correspondence(info):
153
- persons = info.regadr
154
- correspondence = [p for p in persons if p.addrrole == '11']
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 lingua import Language, LanguageDetectorBuilder
155
+ languages = [Language.ENGLISH, Language.FRENCH, Language.GERMAN, Language.ITALIAN]
156
+ detector = LanguageDetectorBuilder.from_languages(*languages).build()
157
+ language = detector.detect_language_of(content)
158
+ if language:
159
+ return language.iso_code_639_1.name.lower()
160
+ else:
161
+ return "en"
@@ -1,91 +1,79 @@
1
- /transac[@deleteflag=0]
2
- /transac
3
- __/marhist
4
- ____/histdata
5
- ______/artnr
6
- ______/colclai
7
- ______/evdat
8
- ______/evdatint
9
- ______/gazchap
10
- ______/gaznum
11
- ______/gsgr
12
- ________/gstermt
13
- __________/gsterml
14
- ________/intregg
15
- __________/nicclai
16
- ______/marart
17
- ________/marartn
18
- ______/marpicn
19
- ______/marrec
20
- ______/marrem
21
- ______/prigr
22
- ________/prio
23
- __________/priappd
24
- __________/prinat
25
- __________/prinr
26
- ________/prirem
27
- ______/pubdate
28
- ______/publcode
29
- ______/publicate
30
- ______/publrem
31
- ______/regadr
32
- ________/addrrole
33
- ________/nameadd
34
- __________/addrl
35
- ____________/addrll
36
- __________/namel
37
- ____________/namell
38
- __________/nat
39
- __________/plainco
40
- ______/register
41
- ______/snapshot
42
- ______/valid
43
- __/marinfo
44
- ____/basannd
45
- ____/basappn
46
- ____/basdeld
47
- ____/basipikey
48
- ____/basregd
49
- ____/basregn
50
- ____/basregper
51
- ____/basstate
52
- ____/colclai
53
- ____/expirationdate
54
- ____/firstgazd
55
- ____/firstgazn
56
- ____/gsgr
57
- ______/gstermt
58
- ________/gsterml
59
- ______/intregg
60
- ________/nicclai
61
- ____/lastgazd
62
- ____/lastgazn
63
- ____/marart
64
- ______/marartn
65
- ____/markve
66
- ____/marpicd
67
- ____/marpicn
68
- ____/marpicrem
69
- ____/marrem
70
- ____/martype
71
- ____/oppositiongr
72
- ______/oppositiondate
73
- ______/oppositionstate
74
- ____/origlan
75
- ____/prigr
76
- ______/prio
77
- ________/priappd
78
- ________/prinat
79
- ________/prinr
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]