flair.datasets.entity_linking.CTD_CHEMICALS_DICTIONARY#
- class flair.datasets.entity_linking.CTD_CHEMICALS_DICTIONARY(base_path=None)View on GitHub#
Bases:
EntityLinkingDictionaryDictionary for named entity linking on chemicals using the Comparative Toxicogenomics Database (CTD).
Fur further information can be found at https://ctdbase.org/
- __init__(base_path=None)View on GitHub#
Initialize the entity linking dictionary.
- Parameters:
candidates – A iterable sequence of all Candidates contained in the knowledge base.
dataset_name – string to prefix concept IDs. To be used for custom dictionaries.
Methods
__init__([base_path])Initialize the entity linking dictionary.
download_dictionary(data_dir)parse_file(original_file)to_in_memory_dictionary()Attributes
candidatesdatabase_nameName of the database represented by the dictionary.
text_to_index- download_dictionary(data_dir)View on GitHub#
- Return type:
Path
- parse_file(original_file)View on GitHub#
- Return type:
Iterator[EntityCandidate]