Skip to content

Commit

Permalink
Update P2N-Nets-new.py
Browse files Browse the repository at this point in the history
New things to clean
  • Loading branch information
Patent2net committed Aug 10, 2021
1 parent a173abb commit c49cf85
Showing 1 changed file with 24 additions and 25 deletions.
49 changes: 24 additions & 25 deletions Patent2Net/P2N-Nets-new.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def cycle (liste):
return tempo

# les trucs à virer des différents champs
Exclus = ['', ' ', 'empty', None, "none"]
Exclus = ['', ' ', 'empty', None, "none", "EMPTY"]
#####


Expand Down Expand Up @@ -202,7 +202,7 @@ def cycle (liste):
df.at [bre.Index, 'applicant' ] = tempoappl

for appl in bre.applicant:
if appl not in bre.inventor:
if appl not in bre.inventor and appl not in Exclus:
Applicants. add(appl.upper())

# special clean qu'on sait pas d'où çà sort
Expand Down Expand Up @@ -397,30 +397,29 @@ def cycle (liste):


for truc in bre.applicant:
Applicants. add(truc)
if len(bre .IPCR11 )>0:
Techno[truc] = [cib for cib in bre .IPCR11]
elif len(bre .IPCR7 )>0:
Techno[truc] = [cib for cib in bre .IPCR7]
elif len(bre .IPCR4 )>0:
Techno[truc] = [cib for cib in bre .IPCR4]
elif len(bre .IPCR1 )>0:
Techno[truc] = [cib for cib in bre .IPCR1]
else:
Techno[truc] = []
Applicants. add(truc)
if len(bre .IPCR11 )>0:
Techno[truc] = [cib for cib in bre .IPCR11]
elif len(bre .IPCR7 )>0:
Techno[truc] = [cib for cib in bre .IPCR7]
elif len(bre .IPCR4 )>0:
Techno[truc] = [cib for cib in bre .IPCR4]
elif len(bre .IPCR1 )>0:
Techno[truc] = [cib for cib in bre .IPCR1]
else:
Techno[truc] = []
for truc in bre .inventor:

Inventeurs.add(truc)
if len(bre .IPCR11 )>0:
Techno[truc] = [cib for cib in bre .IPCR11]
elif len(bre .IPCR7 )>0:
Techno[truc] = [cib for cib in bre .IPCR7]
elif len(bre .IPCR4 )>0:
Techno[truc] = [cib for cib in bre .IPCR4]
elif len(bre .IPCR1 )>0:
Techno[truc] = [cib for cib in bre .IPCR1]
else:
Techno[truc] = []
Inventeurs.add(truc)
if len(bre .IPCR11 )>0:
Techno[truc] = [cib for cib in bre .IPCR11]
elif len(bre .IPCR7 )>0:
Techno[truc] = [cib for cib in bre .IPCR7]
elif len(bre .IPCR4 )>0:
Techno[truc] = [cib for cib in bre .IPCR4]
elif len(bre .IPCR1 )>0:
Techno[truc] = [cib for cib in bre .IPCR1]
else:
Techno[truc] = []


dicoAttrs [bre.label] = {'Famille': sum( [bre.label in truc for truc in df_Fam ['equivalents']]),
Expand Down

0 comments on commit c49cf85

Please sign in to comment.