flair.datasets.entity_linking.NCBI_GENE_HUMAN_DICTIONARY#

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

Bases: EntityLinkingDictionary

Dictionary for named entity linking on diseases using the NCBI Gene ontology.

Note that this dictionary only represents human genes - gene from different species aren’t included!

Fur further information can be found at https://www.ncbi.nlm.nih.gov/gene/

__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]