Ejemplo n.º 1
0
                        if brev[key][0] is not None:
                            tempo[key] = brev[key][0]
                        else:
                            tempo[key] = ''
                    elif brev[key] is None:
                        tempo[key] = ''
                    else:
                        tempo[key] = brev[key]
                except:
                    tempo[key] = "0"  #hum this is fully arbttrary...
    #   tempo[url]

        tempo['inventor-url'] = UrlInventorBuild(brev['inventor'])
        tempo['applicant-url'] = UrlApplicantBuild(brev['applicant'])
        for nb in [1, 3, 4, 7, 11]:
            tempo['IPCR' + str(nb) + '-url'] = UrlIPCRBuild(brev['IPCR' +
                                                                 str(nb)])

        tempo['equivalents-url'] = [
            UrlPatent(lab) for lab in brev['equivalents']
        ]
        tempo['label-url'] = UrlPatent(brev['label'])
        LstExp.append(tempo)
    #    filtering against keys in clesRefs2 for pivottable
    #    tempo2=dict()
    #    clesRef2 = ['label', 'year',  'priority-active-indicator', 'kind', 'applicant', 'country', 'inventor',  'IPCR4', 'IPCR7', "Inventor-Country", "Applicant-Country", 'Citations', u'references', 'CitedBy', ] #'citations','representative',
    #    for ket in clesRef2:
    #        tempo2[ket] = brev[ket] #filtering against clesRef2
    #
    #        if isinstance(brev[ket], list):
    #            tempo2[ket] = UnNest(brev[ket])
    #        else:
Ejemplo n.º 2
0
     G1.node[k][
         'category'] = 'applicant'  # for readable facility
     G1.node[k]['url'] = UrlApplicantBuild(
         G1.node[k]['label'])[0]
     Visu['color']['a'] = 1
     Visu['color']['r'] = int(127)
     Visu['color']['g'] = int(0)
     Visu['color']['b'] = int(127)
     Visu['shape'] = "star"
 elif G1.node[k]['category'] == 'IPCR1' or G1.node[k][
         'category'] == 'IPCR3' or G1.node[k][
             'category'] == 'IPCR4' or G1.node[k][
                 'category'] == 'IPCR7' or G1.node[k][
                     'category'] == 'IPCR7' or G1.node[k][
                         'category'] == 'CPC':
     G1.node[k]['url'] = UrlIPCRBuild(G1.node[k]['label'])[0]
     Visu['color']['a'] = 1
     Visu['color']['r'] = int(127)
     Visu['color']['g'] = int(254)
     Visu['color']['b'] = int(127)
     Visu['shape'] = "database"
 elif G1.node[k]['category'] == 'inventor-nice':
     G1.node[k][
         'category'] = 'inventor'  # for readable facility
     G1.node[k]['url'] = UrlInventorBuild(
         G1.node[k]['label'])[0]
     Visu['color']['a'] = 1
     Visu['color']['r'] = int(127)
     Visu['color']['g'] = int(127)
     Visu['color']['b'] = int(254)
     Visu['shape'] = "triangleDown"