Skip to content

Commit

Permalink
code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Benedikt Fuchs committed Jul 5, 2024
1 parent 1447745 commit 1aec900
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions flair/models/entity_linker_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -164,9 +164,8 @@ def _get_data_points_from_sentence(self, sentence: Sentence) -> List[Span]:
return sentence.get_spans(self.label_type)

def _filter_data_point(self, data_point: Sentence) -> bool:
if self._span_label_type is not None:
if bool(data_point.get_labels(self._span_label_type)):
return True
if self._span_label_type is not None and bool(data_point.get_labels(self._span_label_type)):
return True
return bool(data_point.get_labels(self.label_type))

def _get_embedding_for_data_point(self, prediction_data_point: Span) -> torch.Tensor:
Expand Down

0 comments on commit 1aec900

Please sign in to comment.