fix, ipcs vor 2006 wurden falsch eingelesen
This commit is contained in:
+25
-12
@@ -262,20 +262,33 @@ def parse(xml_dict, filename, tree):
|
||||
# patent classification tags from 2005 and earlier
|
||||
# ipc
|
||||
if sdobi.get("B500").get("B510") != None:
|
||||
es_dict["ipc"] = [sdobi.get("B500").get("B510")]
|
||||
es_dict["ipc_text"] = sdobi.get("B500").get("B510")
|
||||
# es_dict["ipc"] = [sdobi.get("B500").get("B510")]
|
||||
# es_dict["ipc_text"] = sdobi.get("B500").get("B510")
|
||||
classis = []
|
||||
if sdobi.get("B500").get("B510").get("B511") != None:
|
||||
es_dict["section"] = [sdobi.get("B500").get("B510").get("B511")]
|
||||
try:
|
||||
if sdobi.get("B500").get("B510").get("B511") != None:
|
||||
classis.append(sdobi.get("B500").get("B510").get("B511"))
|
||||
except:
|
||||
for i in range(len(sdobi.get("B500").get("B510").get("B511"))):
|
||||
classis.append(sdobi.get("B500").get("B510").get("B511")[i])
|
||||
if sdobi.get("B500").get("B510").get("B512") != None:
|
||||
es_dict["class"] = [sdobi.get("B500").get("B510").get("B512")]
|
||||
if sdobi.get("B500").get("B510").get("B513") != None:
|
||||
es_dict["subclass"] = [sdobi.get("B500").get("B510").get("B513")]
|
||||
if sdobi.get("B500").get("B510").get("B514") != None:
|
||||
es_dict["linked_indexing_code"] = sdobi.get("B500").get("B510").get("B514")
|
||||
if sdobi.get("B500").get("B510").get("B515") != None:
|
||||
es_dict["unlinked_indexing_code"] = sdobi.get("B500").get("B510").get("B515")
|
||||
if sdobi.get("B500").get("B510").get("B517EP") != None:
|
||||
es_dict["non_obligatory_suppl_class"] = sdobi.get("B500").get("B510").get("B517EP")
|
||||
b512 = sdobi.get("B500").get("B510").get("B512")
|
||||
if isinstance(b512, str):
|
||||
classis.append(b512)
|
||||
elif isinstance(b512, list):
|
||||
for i in range(len(b512)):
|
||||
classis.append(b512[i])
|
||||
|
||||
es_dict["ipc"] = classis
|
||||
text_combi = ""
|
||||
for text in classis:
|
||||
if text is not None:
|
||||
text_combi += text + " - "
|
||||
if text_combi != "":
|
||||
text_combi = text_combi[:-3]
|
||||
|
||||
es_dict["ipc_text"] = text_combi
|
||||
|
||||
# patent classification tags from 2006 and later
|
||||
# its one string that needs to be splittet into the classification parts
|
||||
|
||||
Reference in New Issue
Block a user