Skip to content

Commit

Permalink
improve typing and run black
Browse files Browse the repository at this point in the history
  • Loading branch information
Benedikt Fuchs committed Feb 2, 2024
1 parent 960af8b commit 170a31b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions flair/datasets/entity_linking.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ def __init__(
self._idx_to_candidates = {candidate.concept_id: candidate for candidate in candidates}

# one name can map to multiple concepts
self._text_to_index: Dict[str, List] = {}
self._text_to_index: Dict[str, List[str]] = {}
for candidate in candidates:
for text in [candidate.concept_name, *candidate.synonyms]:
if text not in self._text_to_index:
Expand All @@ -54,7 +54,7 @@ def database_name(self) -> str:
return self._dataset_name

@property
def text_to_index(self) -> Dict[str, List]:
def text_to_index(self) -> Dict[str, List[str]]:
return self._text_to_index

@property
Expand Down

0 comments on commit 170a31b

Please sign in to comment.