Norm = dict() for Brev in ListeBrevet: norm = 0 for cle in Brev.keys(): if type(Brev[cle]) == type([]): norm += len(Brev[cle]) else: norm += 1 Brev['Norm'] = norm Norm[Brev['label']] = norm #les deux lignes suivante sont inutiles si l'on commente les bonnes lignes lors de la création des attributs du graphes... # c'est dans la todo-list car améliorerait grandement les perf sur des gros réseaux Pays, Inventeurs, LabelBrevet, Applicant = set(), set(), set(), set() Classification, IPCR1, IPCR3, IPCR4, IPCR7, IPCR11 = [], [], [], [], [], [] Pays = set([(u) for u in GenereListeSansDate(ListeBrevet, 'pays')]) Inventeurs = set([ (u) for u in GenereListeSansDate(ListeBrevet, 'inventeur') ]) LabelBrevet = set([(u) for u in GenereListeSansDate(ListeBrevet, 'label')]) Applicant = set([ (u) for u in GenereListeSansDate(ListeBrevet, 'applicant') ]) # Classification = ContractList([(u) for u in GenereListeSansDate(ListeBrevet, 'classification')]) IPCR1 = ContractList([ (u) for u in GenereListeSansDate(ListeBrevet, 'IPCR1') ]) IPCR3 = ContractList([ (u) for u in GenereListeSansDate(ListeBrevet, 'IPCR3')
for cle in Brev.keys(): if type(Brev[cle]) == type([]): norm += len(Brev[cle]) else: norm += 1 Brev['Norm'] = norm Norm[Brev['label']] = norm #les deux lignes suivante sont inutiles si l'on commente les bonnes lignes lors de la création des attributs du graphes... # c'est dans la todo-list car améliorerait grandement les perf sur des gros réseaux Pays, Inventeurs, LabelBrevet, Applicant = set(), set(), set(), set() Classification, IPCR1, IPCR3, IPCR4, IPCR7, IPCR11 = [], [], [], [], [], [] # Pays = set([(u) for u in GenereListeSansDate(ListeBrevet, 'pays')]) # Inventeurs = set([(u) for u in GenereListeSansDate(ListeBrevet, 'inventeur')]) # LabelBrevet = set([(u) for u in GenereListeSansDate(ListeBrevet, 'label')]) Applicant = set([(u) for u in GenereListeSansDate(ListeBrevet, 'applicant')]) # Classification, IPCR1, IPCR3, IPCR4, IPCR7, IPCR11 = [], [], [], [], [], [] # Classification = [tt for tt in Ops3.UnNest2List([u['classification'] for u in ListeBrevet if u['classification'] != '']) if tt not in Classification] #Classification = ContractList([(u) for u in GenereListeSansDate(ListeBrevet, 'classification')]) # IPCR1 = list(set([tt for tt in Ops3.UnNest2List([u['IPCR1'] for u in ListeBrevet if u['IPCR1'] != ''])])) # IPCR3 = list(set([tt for tt in Ops3.UnNest2List([u['IPCR3'] for u in ListeBrevet if u['IPCR3'] != ''])])) # IPCR1 = list(set([tt for tt in Ops3.UnNest2List([u['IPCR1'] for u in ListeBrevet if u['IPCR1'] != ''])])) # IPCR4 = list(set([tt for tt in Ops3.UnNest2List([u['IPCR4'] for u in ListeBrevet if u['IPCR4'] != ''])])) # IPCR7 = list(set([tt for tt in Ops3.UnNest2List([u['IPCR7'] for u in ListeBrevet if u['IPCR7'] != ''])])) # IPCR11 = list(set([tt for tt in Ops3.UnNest2List([u['IPCR11'] for u in ListeBrevet if u['IPCR11'] != '']) if tt not in IPCR11])) # # IPCR3 = ContractList([(u) for u in GenereListeSansDate(ListeBrevet, 'IPCR3')]) # IPCR4 = ContractList([(u) for u in GenereListeSansDate(ListeBrevet, 'IPCR4')]) # IPCR7 = ContractList([(u) for u in GenereListeSansDate(ListeBrevet, 'IPCR7')]) # IPCR11 = ContractList([(u) for u in GenereListeSansDate(ListeBrevet, 'IPCR11')])
norm = 0 for cle in Brev.keys(): if type(Brev[cle]) == type([]): norm += len(Brev[cle]) else: norm += 1 Brev['Norm'] = norm Norm[Brev['label']] = norm #les deux lignes suivante sont inutiles si l'on commente les bonnes lignes lors de la création des attributs du graphes... # c'est dans la todo-list car améliorerait grandement les perf sur des gros réseaux Pays, Inventeurs, LabelBrevet, Applicant = set(), set(), set(), set() Classification, IPCR1, IPCR3, IPCR4, IPCR7, IPCR11 = [], [], [], [], [], [] # Pays = set([(u) for u in GenereListeSansDate(ListeBrevet, 'pays')]) Inventeurs = set([ (u) for u in GenereListeSansDate(ListeBrevet, 'inventeur') ]) # LabelBrevet = set([(u) for u in GenereListeSansDate(ListeBrevet, 'label')]) Applicant = set([ (u) for u in GenereListeSansDate(ListeBrevet, 'applicant') ]) #Classification = [tt for tt in Ops3.UnNest2List([u['classification'] for u in ListeBrevet if u['classification'] != '']) if tt not in Classification] #Classification = ContractList([(u) for u in GenereListeSansDate(ListeBrevet, 'classification')]) # IPCR1 = list(set([tt for tt in Ops3.UnNest2List([u['IPCR1'] for u in ListeBrevet if u['IPCR1'] != ''])])) # IPCR3 = list(set([tt for tt in Ops3.UnNest2List([u['IPCR3'] for u in ListeBrevet if u['IPCR3'] != ''])])) # IPCR1 = list(set([tt for tt in Ops3.UnNest2List([u['IPCR1'] for u in ListeBrevet if u['IPCR1'] != ''])])) # IPCR4 = list(set([tt for tt in Ops3.UnNest2List([u['IPCR4'] for u in ListeBrevet if u['IPCR4'] != ''])])) # IPCR7 = list(set([tt for tt in Ops3.UnNest2List([u['IPCR7'] for u in ListeBrevet if u['IPCR7'] != ''])])) # IPCR11 = list(set([tt for tt in Ops3.UnNest2List([u['IPCR11'] for u in ListeBrevet if u['IPCR11'] != '']) if tt not in IPCR11])) #
for cle in Brev.keys(): if type(Brev[cle]) == type([]): norm += len(Brev[cle]) else: norm += 1 Brev['Norm'] = norm Norm[Brev['label']] = norm #les deux lignes suivante sont inutiles si l'on commente les bonnes lignes lors de la création des attributs du graphes... # c'est dans la todo-list car améliorerait grandement les perf sur des gros réseaux Pays, Inventeurs, LabelBrevet, Applicant = set(), set(), set(), set() Classification, IPCR1, IPCR3, IPCR4, IPCR7, IPCR11 = [], [], [], [], [], [] # Pays = set([(u) for u in GenereListeSansDate(ListeBrevet, 'pays')]) Inventeurs = set([ (u) for u in GenereListeSansDate(ListeBrevet, 'inventeur') ]) # LabelBrevet = set([(u) for u in GenereListeSansDate(ListeBrevet, 'label')]) # Applicant = set([(u) for u in GenereListeSansDate(ListeBrevet, 'applicant')]) # # Classification, IPCR1, IPCR3, IPCR4, IPCR7, IPCR11 = [], [], [], [], [], [] # Classification = [tt for tt in Ops3.UnNest2List([u['classification'] for u in ListeBrevet if u['classification'] != '']) if tt not in Classification] # #Classification = ContractList([(u) for u in GenereListeSansDate(ListeBrevet, 'classification')]) # IPCR1 = list(set([tt for tt in Ops3.UnNest2List([u['IPCR1'] for u in ListeBrevet if u['IPCR1'] != ''])])) # IPCR3 = list(set([tt for tt in Ops3.UnNest2List([u['IPCR3'] for u in ListeBrevet if u['IPCR3'] != ''])])) # IPCR1 = list(set([tt for tt in Ops3.UnNest2List([u['IPCR1'] for u in ListeBrevet if u['IPCR1'] != ''])])) # IPCR4 = list(set([tt for tt in Ops3.UnNest2List([u['IPCR4'] for u in ListeBrevet if u['IPCR4'] != ''])])) # IPCR7 = list(set([tt for tt in Ops3.UnNest2List([u['IPCR7'] for u in ListeBrevet if u['IPCR7'] != ''])])) # IPCR11 = list(set([tt for tt in Ops3.UnNest2List([u['IPCR11'] for u in ListeBrevet if u['IPCR11'] != '']) if tt not in IPCR11])) # # IPCR3 = ContractList([(u) for u in GenereListeSansDate(ListeBrevet, 'IPCR3')])