File tree 1 file changed +1
-9
lines changed
deep_reference_parser/prodigy
1 file changed +1
-9
lines changed Original file line number Diff line number Diff line change @@ -281,28 +281,20 @@ def reference_to_token_annotations(
281
281
282
282
# Only run the tagger on annotated examples.
283
283
284
- not_annotated_docs = [doc for doc in ref_annotated_docs if not doc .get ("spans" )]
285
284
ref_annotated_docs = [doc for doc in ref_annotated_docs if doc .get ("spans" )]
286
285
287
286
logger .info (
288
287
"Loaded %s documents with reference annotations" , len (ref_annotated_docs )
289
288
)
290
- logger .info (
291
- "Loaded %s documents with no reference annotations" , len (not_annotated_docs )
292
- )
293
289
294
290
annotator = TokenTagger (task = task , lowercase = lowercase , text = text )
295
291
296
292
token_annotated_docs = annotator .run (ref_annotated_docs )
297
- all_docs = token_annotated_docs + not_annotated_docs
298
293
299
- write_jsonl (all_docs , output_file = output_file )
294
+ write_jsonl (token_annotated_docs , output_file = output_file )
300
295
301
296
logger .info (
302
297
"Wrote %s docs with token annotations to %s" ,
303
298
len (token_annotated_docs ),
304
299
output_file ,
305
300
)
306
- logger .info (
307
- "Wrote %s docs with no annotations to %s" , len (not_annotated_docs ), output_file
308
- )
You can’t perform that action at this time.
0 commit comments