示例#1
0
                    elif isinstance(brev[key], list) and len(brev[key]) == 1:
                        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
    #
示例#2
0
                    Visu['color']['g'] = int(127)
                    Visu['color']['b'] = int(127)
                    Visu['shape'] = "square"
                    G1.node[k]['url'] = UrlPatent(G1.node[k]['label'])[0]

                elif G1.node[k]['category'] == "equivalents":
                    Visu['color']['a'] = 1
                    Visu['color']['r'] = int(127)
                    Visu['color']['g'] = int(127)
                    Visu['color']['b'] = int(0)
                    Visu['shape'] = "ellipse"
                    G1.node[k]['url'] = UrlPatent(G1.node[k]['label'])[0]
                elif G1.node[k]['category'] == 'applicant-nice':
                    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)