flair.datasets.entity_linking.NCBI_TAXONOMY_DICTIONARY#

class flair.datasets.entity_linking.NCBI_TAXONOMY_DICTIONARY(base_path=None)View on GitHub#

Bases: EntityLinkingDictionary

Dictionary for named entity linking on organisms / species using the NCBI taxonomy ontology.

Further information about the ontology can be found at https://www.ncbi.nlm.nih.gov/taxonomy

__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_dictionary(original_file)

to_in_memory_dictionary()

Attributes

candidates

database_name

Name of the database represented by the dictionary.

text_to_index

download_dictionary(data_dir)View on GitHub#
Return type:

Path

parse_dictionary(original_file)View on GitHub#
Return type:

Iterator[EntityCandidate]