File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -146,8 +146,7 @@ def _filter_extractions(
146146 kept .append (ext )
147147 else :
148148 logger .warning (
149- "Dropping extraction with unknown class %r (text=%r). "
150- "Allowed classes: %s" ,
149+ "Dropping extraction with unknown class %r (text=%r). Allowed classes: %s" ,
151150 ext .extraction_class ,
152151 ext .extraction_text ,
153152 ", " .join (sorted (allowed_classes )),
Original file line number Diff line number Diff line change @@ -145,9 +145,7 @@ def test_keeps_valid_extractions(self):
145145 lx .data .Extraction (extraction_class = "target" , extraction_text = "COX-2" ),
146146 ]
147147 )
148- filtered = NERExtractor ._filter_extractions (
149- doc , {"compound_name" , "target" }
150- )
148+ filtered = NERExtractor ._filter_extractions (doc , {"compound_name" , "target" })
151149 assert len (filtered .extractions ) == 2
152150
153151 def test_drops_hallucinated_classes (self ):
@@ -158,9 +156,7 @@ def test_drops_hallucinated_classes(self):
158156 lx .data .Extraction (extraction_class = "toxicity" , extraction_text = "hepatotoxic" ),
159157 ]
160158 )
161- filtered = NERExtractor ._filter_extractions (
162- doc , {"compound_name" , "target" }
163- )
159+ filtered = NERExtractor ._filter_extractions (doc , {"compound_name" , "target" })
164160 assert len (filtered .extractions ) == 1
165161 assert filtered .extractions [0 ].extraction_text == "Aspirin"
166162
You can’t perform that action at this time.
0 commit comments