Skip to content

Commit

Permalink
remove warning in convert_to_text_document_with_labeled_spans_and_bin…
Browse files Browse the repository at this point in the history
…ary_relations when entity name is not the same as the span text (#139)
  • Loading branch information
ArneBinder authored Jul 17, 2024
1 parent 937a954 commit 1a19cdf
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions dataset_builders/pie/biorel/biorel.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,12 +76,6 @@ def convert_to_text_document_with_labeled_spans_and_binary_relations(
labeled_span = LabeledSpan(start=entity.start, end=entity.end, label="ENTITY")
text_document.labeled_spans.append(labeled_span)

# check if the labeled span text is the same as the entity name
if str(labeled_span) != entity.name:
logger.warning(
f"Expected labeled span text to be '{entity.name}', got '{labeled_span}'"
)

# Map the original entity to the new labeled span
old2new_spans[entity] = labeled_span

Expand Down

0 comments on commit 1a19cdf

Please sign in to comment.