<commit_before># -*- coding: utf-8 -*-
# (c) 2009 ***REMOVED***
# (c) 2015 <NAME>, Elmyra UG <<EMAIL>>
from collections import OrderedDict
from elmyra.ip.util.numbers.normalize import normalize_patent


t = OrderedDict()

# amo
t['EP666666B1']     = 'EP0666666B1'
t['EP1000000']      = 'EP1000000'

t['EP7054A1']       = 'EP0007054A1'
t['EP0007054A1']    = 'EP0007054A1'
t['EP00007054A1']   = 'EP0007054A1'

t['DE10142737B4 ']  = 'DE10142737B4'
t['WO2006113621A3'] = 'WO2006113621A3'
t[' WO199816331A3'] = 'WO1998016331A3'
t['WO00001014A1']   = 'WO2000001014A1'
t['WO01002000A3']   = 'WO2001002000A3'
t['WO9912345']      = 'WO1999012345'
t['WO99123456']     = 'WO1999123456'
t['WO0112345']      = 'WO2001012345'
t['US07318131B2']   = 'US7318131B2'

# examples from günther
t['WO0198623A1']    = 'WO2001098623A1'      # original (from publication date and inside pdf): 2+5
t['WO01098623A1']   = 'WO2001098623A1'      # wrong as of publication date: 2+6
t['WO2001098623A1'] = 'WO2001098623A1'      # normalized: 4+6
t['WO200198623A1']  = 'WO2001098623A1'      # definitively wrong: 4+5
t['WO2001098623A1'] = 'WO2001098623A1'      # wrong: 4+6, but wrong publication date; should be 2+5
t['WO200946303']    = 'WO2009046303'        # 4+5
t['WO03107732']     = 'WO2003107732'
t['WO2003107732']   = 'WO2003107732'
t['WO2004000001']   = 'WO2004000001'
t['WO99/13800']     = 'WO1999013800'

# examples from nora (also aus jeder periode mit und ohne 0 auffüllung eine)
t['WO 9923997']     = 'WO1999023997'
t['WO 9004917']     = 'WO1990004917'
t['WO 0027301']     = 'WO2000027301'
t['WO 0000748']     = 'WO2000000748'
t['WO 03043359']    = 'WO2003043359'
t['WO 03107520']    = 'WO2003107520'
t['WO 2007054055']  = 'WO2007054055'
t['US20010003540']  = 'US20010003540'
t['US2001003540']   = 'US20010003540'
t['US200103540']    = 'US20010003540'

***REMOVED***
t['US07317210B2']    = 'US7317210B2'
t['AT409 902B']      = 'AT409902B'
t['DE31 00 442C1']   = 'DE3100442C1'
t['EP1083612']       = 'EP1083612'
t['EP083612']        = 'EP0083612'
t['EP0 240 590B1']   = 'EP0240590B1'
t['GB2 000 685A']    = 'GB2000685A'
t['JP2000182770A']   = 'JP2000182770A'
t['JP8-179521']      = 'JPH08179521'        # bei günther nachfragen
t['JP05-142789']     = 'JPH05142789'        # bei günther nachfragen
t['JP2000-347427']   = 'JP2000347427'       # bei günther nachfragen
t['KR2001-0024348']  = 'KR20010024348'
t['WOWO 99/39395']   = 'WO1999039395'
t['WOWO00/05701']    = 'WO2000005701'
t['US147451A']       = 'US147451A'
t['US0147451A']      = 'US147451A'
#t['US100147451A']    = 'US100147451A'          # PRÜFEN!

t['US2002/0066904A1']= 'US20020066904A1'
t['US6147451A']      = 'US6147451A'
t['US147451A']       = 'US147451A'
t['USD281167S']      = 'USD281167S'
t['USUS5650746A']    = 'US5650746A'
t['USDES374176S']    = 'USD374176S'
t['US60/609868A']    = 'US60609868A'
t['US09/930611A']    = 'US9930611A'

# fantasy
t['USD123456789']    = 'USD123456789'
t['USRE123456789']   = 'USRE123456789'
t['USRE1234E1']      = 'USRE01234E1'
t['US6147451A']      = 'US6147451A'

# from production
t['USD0558961']          = 'USD558961'
t['WODM 055039']         = 'WODM055039'         # see http://www.freepatentsonline.com/D558991.html
t['DEM 89 08 812']       = 'DEM8908812'

t['USRE039998E1']        = 'USRE39998E1'
t['USRE1234E1']          = 'USRE01234E1'
t['USD000123456']        = 'USD123456'
t['USD1234']             = 'USD001234'
t['USRX12']              = 'USRX12'

t['WOPCT/WO9831467']     = 'WO1998031467'
t['WOPCT/US1999/02091']  = 'PCT/US1999/002091'
t['WOPCT/GB1999/01042']  = 'PCT/GB1999/001042'
t['WOPCT/EP02/07746']    = 'PCT/EP2002/007746'

t['WOPCT/US1999/02091']  = 'PCT/US1999/002091'
t['WOPCT/GB1999/01042']  = 'PCT/GB1999/001042'
t['WOPCT/EP02/07746']    = 'PCT/EP2002/007746'
t['WOPCT/EP02/07746']    = 'PCT/EP2002/007746'
t['WOPCT/US98/09178']    = 'PCT/US1998/009178'
t['WOPCT/AU95/00354']    = 'PCT/AU1995/000354'
t['WOPCT-WO97/29690']    = 'WO1997029690'
t['WOPCT-WO00/67640']    = 'WO2000067640'
t['WOPCT/FR98/02552']    = 'PCT/FR1998/002552'
t['WOWO2003-EP8824']     = None
t['IT19732A/88']         = None
t['WOPCT/CA98/00092']    = 'PCT/CA1998/000092'
t['WOPCT/CA98/00092']    = 'PCT/CA1998/000092'
t['JPHEI 3-53606']       = None
t['WOPCT/US02/03226']    = 'PCT/US2002/003226'
t['WOPCT/US2004/011130'] = 'PCT/US2004/011130'
t['WOPCT/US86/01765']    = 'PCT/US1986/001765'
t['WOPCT/US2004/003151'] = 'PCT/US2004/003151'

t['PCT/US99/009417']     = 'PCT/US1999/009417'
t['PCT/US1999/9417']     = 'PCT/US1999/009417'

# via: http://books.google.de/books?id=waOrACYzONMC&pg=PA91&lpg=PA91&dq=uspto+patent+number+format&source=bl&ots=tjJ3TgD9HH&sig=WUnhlkYPBaCYFJpgJNyptyEoMdE&hl=de&ei=WjD3SoTPCJzymwOEw4W0Aw&sa=X&oi=book_result&ct=result&resnum=3&ved=0CBEQ6AEwAg
t['US845948']            = 'US845948'           # appnum
t['US6990683']           = 'US6990683'          # pubnum
#t['WOEP/2004/008531']    = 'PCT/EP2004/008531'  # appnum
t['WO2005/098230']       = 'WO2005098230'       # pubnum
t['EP20020762866']       = 'EP20020762866'      # appnum
t['EP1333613']           = 'EP1333613'          # pubnum
# IPOS: appnum: 200507268-1, pubnum: 117045
t['JP100762']            = 'JP100762'           # appnum
t['JP1309841']           = 'JP1309841'          # pubnum
t['CN2172863']           = 'CN2172863'          # appnum
t['CN566528']            = 'CN566528'           # pubnum
# TIPO: appnum: 90121515, pubnum: 595092
t['GB20040008721']       = 'GB20040008721'      # appnum
t['GB2413271A']          = 'GB2413271A'         # pubnum
# KIPO: appnum: 1019980006278, pubnum: 100280219
# TIPIC: appnum: 13884, pubnum: 10674

# patlib.inc.php: get_patent_patched
t['US2005015034A1']      = 'US20050015034A1'

# from utils.py<commit_msg>middleware: adapt tests to changes in US number normalization<commit_after># -*- coding: utf-8 -*-
# (c) 2009 ***REMOVED***
# (c) 2015 <NAME>, Elmyra UG <<EMAIL>>
from collections import OrderedDict
from elmyra.ip.util.numbers.normalize import normalize_patent


t = OrderedDict()

# amo
t['EP666666B1']     = 'EP0666666B1'
t['EP1000000']      = 'EP1000000'

t['EP7054A1']       = 'EP0007054A1'
t['EP0007054A1']    = 'EP0007054A1'
t['EP00007054A1']   = 'EP0007054A1'

t['DE10142737B4 ']  = 'DE10142737B4'
t['WO2006113621A3'] = 'WO2006113621A3'
t[' WO199816331A3'] = 'WO1998016331A3'
t['WO00001014A1']   = 'WO2000001014A1'
t['WO01002000A3']   = 'WO2001002000A3'
t['WO9912345']      = 'WO1999012345'
t['WO99123456']     = 'WO1999123456'
t['WO0112345']      = 'WO2001012345'
t['US07318131B2']   = 'US7318131B2'

# examples from günther
t['WO0198623A1']    = 'WO2001098623A1'      # original (from publication date and inside pdf): 2+5
t['WO01098623A1']   = 'WO2001098623A1'      # wrong as of publication date: 2+6
t['WO2001098623A1'] = 'WO2001098623A1'      # normalized: 4+6
t['WO200198623A1']  = 'WO2001098623A1'      # definitively wrong: 4+5
t['WO2001098623A1'] = 'WO2001098623A1'      # wrong: 4+6, but wrong publication date; should be 2+5
t['WO200946303']    = 'WO2009046303'        # 4+5
t['WO03107732']     = 'WO2003107732'
t['WO2003107732']   = 'WO2003107732'
t['WO2004000001']   = 'WO2004000001'
t['WO99/13800']     = 'WO1999013800'

# examples from nora (also aus jeder periode mit und ohne 0 auffüllung eine)
t['WO 9923997']     = 'WO1999023997'
t['WO 9004917']     = 'WO1990004917'
t['WO 0027301']     = 'WO2000027301'
t['WO 0000748']     = 'WO2000000748'
t['WO 03043359']    = 'WO2003043359'
t['WO 03107520']    = 'WO2003107520'
t['WO 2007054055']  = 'WO2007054055'
t['US20010003540']  = 'US2001003540'
t['US2001003540']   = 'US2001003540'
t['US200103540']    = 'US2001003540'

***REMOVED***
t['US07317210B2']    = 'US7317210B2'
t['AT409 902B']      = 'AT409902B'
t['DE31 00 442C1']   = 'DE3100442C1'
t['EP1083612']       = 'EP1083612'
t['EP083612']        = 'EP0083612'
t['EP0 240 590B1']   = 'EP0240590B1'
t['GB2 000 685A']    = 'GB2000685A'
t['JP2000182770A']   = 'JP2000182770A'
t['JP8-179521']      = 'JPH08179521'        # bei günther nachfragen
t['JP05-142789']     = 'JPH05142789'        # bei günther nachfragen
t['JP2000-347427']   = 'JP2000347427'       # bei günther nachfragen
t['KR2001-0024348']  = 'KR20010024348'
t['WOWO 99/39395']   = 'WO1999039395'
t['WOWO00/05701']    = 'WO2000005701'
t['US147451A']       = 'US147451A'
t['US0147451A']      = 'US147451A'
#t['US100147451A']    = 'US100147451A'          # PRÜFEN!

t['US2002/0066904A1']= 'US2002066904A1'
t['US6147451A']      = 'US6147451A'
t['US147451A']       = 'US147451A'
t['USD281167S']      = 'USD281167S'
t['USUS5650746A']    = 'US5650746A'
t['USDES374176S']    = 'USD374176S'
t['US60/609868A']    = 'US60609868A'
t['US09/930611A']    = 'US9930611A'

# fantasy
t['USD123456789']    = 'USD123456789'
t['USRE123456789']   = 'USRE123456789'
t['USRE1234E1']      = 'USRE01234E1'
t['US6147451A']      = 'US6147451A'

# from production
t['USD0558961']          = 'USD558961'
t['WODM 055039']         = 'WODM055039'         # see http://www.freepatentsonline.com/D558991.html
t['DEM 89 08 812']       = 'DEM8908812'

t['USRE039998E1']        = 'USRE39998E1'
t['USRE1234E1']          = 'USRE01234E1'
t['USD000123456']        = 'USD123456'
t['USD1234']             = 'USD001234'
t['USRX12']              = 'USRX12'

t['WOPCT/WO9831467']     = 'WO1998031467'
t['WOPCT/US1999/02091']  = 'PCT/US1999/002091'
t['WOPCT/GB1999/01042']  = 'PCT/GB1999/001042'
t['WOPCT/EP02/07746']    = 'PCT/EP2002/007746'

t['WOPCT/US1999/02091']  = 'PCT/US1999/002091'
t['WOPCT/GB1999/01042']  = 'PCT/GB1999/001042'
t['WOPCT/EP02/07746']    = 'PCT/EP2002/007746'
t['WOPCT/EP02/07746']    = 'PCT/EP2002/007746'
t['WOPCT/US98/09178']    = 'PCT/US1998/009178'
t['WOPCT/AU95/00354']    = 'PCT/AU1995/000354'
t['WOPCT-WO97/29690']    = 'WO1997029690'
t['WOPCT-WO00/67640']    = 'WO2000067640'
t['WOPCT/FR98/02552']    = 'PCT/FR1998/002552'
t['WOWO2003-EP8824']     = None
t['IT19732A/88']         = None
t['WOPCT/CA98/00092']    = 'PCT/CA1998/000092'
t['WOPCT/CA98/00092']    = 'PCT/CA1998/000092'
t['JPHEI 3-53606']       = None
t['WOPCT/US02/03226']    = 'PCT/US2002/003226'
t['WOPCT/US2004/011130'] = 'PCT/US2004/011130'
t['WOPCT/US86/01765']    = 'PCT/US1986/001765'
t['WOPCT/US2004/003151'] = 'PCT/US2004/003151'

t['PCT/US99/009417']     = 'PCT/US1999/009417'
t['PCT/US1999/9417']     = 'PCT/US1999/009417'

# via: http://books.google.de/books?id=waOrACYzONMC&pg=PA91&lpg=PA91&dq=uspto+patent+number+format&source=bl&ots=tjJ3TgD9HH&sig=WUnhlkYPBaCYFJpgJNyptyEoMdE&hl=de&ei=WjD3SoTPCJzymwOEw4W0Aw&sa=X&oi=book_result&ct=result&resnum=3&ved=0CBEQ6AEwAg
t['US845948']            = 'US845948'           # appnum
t['US6990683']           = 'US6990683'          # pubnum
#t['WOEP/2004/008531']    = 'PCT/EP2004/008531'  # appnum
t['WO2005/098230']       = 'WO2005098230'       # pubnum
t['EP20020762866']       = 'EP20020762866'      # appnum
t['EP1333613']           = 'EP1333613'          # pubnum
# IPOS: appnum: 200507268-1, pubnum: 117045
t['JP100762']            = 'JP100762'           # appnum
t['JP1309841']           = 'JP1309841'          # pubnum
t['CN2172863']           = 'CN2172863'          # appnum
t['CN566528']            = 'CN566528'           # pubnum
# TIPO: appnum: 90121515, pubnum: 595092
t['GB20040008721']       = 'GB20040008721'      # appnum
t['GB2413271A']          = 'GB2413271A'         # pubnum
# KIPO: appnum: 1019980006278, pubnum: 100280219
# TIPIC: appnum: 13884, pubnum: 10674

# patlib.inc.php: get_patent_patched
t['US2005015034A1']      = 'US2005015034A1'

# from utils.py
{'fraction_non_alphanumeric': 0.1761121267519805, 'fraction_numerical': 0.3277618177069731, 'mean_word_length': 3.5896923691570115, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6000204', 'n_tokens_mistral': 7633, 'n_tokens_neox': 5278, 'n_words': 725}