File tree Expand file tree Collapse file tree 2 files changed +9
-3
lines changed
Expand file tree Collapse file tree 2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44
55[project ]
66name = " traiter"
7- version = " 2.2.2 "
7+ version = " 2.2.3 "
88description = " Rule-based parsers for mining text from research sources"
99readme = " README.md"
1010license = {file = " LICENSE" }
Original file line number Diff line number Diff line change @@ -68,7 +68,6 @@ def pipe(cls, nlp: Language):
6868 overwrite = ["lat_long" ],
6969 compiler = cls .lat_long_plus_patterns (),
7070 )
71- # add.debug_tokens(nlp) # #############################################
7271 add .cleanup_pipe (nlp , name = "lat_long_cleanup" )
7372
7473 @classmethod
@@ -81,7 +80,6 @@ def lat_long_patterns(cls):
8180 "-" : {"TEXT" : {"IN" : const .DASH }},
8281 "'s" : {"LOWER" : "'s" },
8382 "99" : {"LOWER" : {"REGEX" : r"^\d{1,2}$" }},
84- "9999" : {"LOWER" : {"REGEX" : r"^\d+$" }},
8583 "99.0" : {"TEXT" : {"REGEX" : rf"^{ cls .float_ll } $" }},
8684 "99.99" : {"TEXT" : {"REGEX" : r"^\d+\.\d{2,}$" }},
8785 "[+]" : {"TEXT" : {"REGEX" : cls .plus }},
@@ -102,6 +100,14 @@ def lat_long_patterns(cls):
102100 }
103101
104102 return [
103+ Compiler (
104+ label = "not_lat_long" ,
105+ decoder = decoder ,
106+ on_match = reject_match .REJECT_MATCH ,
107+ patterns = [
108+ " 99.0 - 99.0 m " ,
109+ ],
110+ ),
105111 Compiler (
106112 label = "lat_long" ,
107113 on_match = "lat_long_match" ,
You can’t perform that action at this time.
0 commit comments