nimare.annotate.cogat
.CogAtLemmatizer
- class CogAtLemmatizer(ontology_df=None)[source]
Bases:
object
Replace synonyms and abbreviations with Cognitive Atlas identifiers in text.
- Parameters:
ontology_df (
pandas.DataFrame
, optional) – DataFrame with three columns (id, name, alias) and one row for each alias (e.g., synonym or abbreviation) for each term in the Cognitive Atlas. If None, loads ontology file from resources folder. Default is None.- Variables:
ontology (
pandas.DataFrame
) – Ontology in DataFrame form.regex (
dict
) – Dictionary linking aliases in ontology to regular expressions for lemmatization.
Notes
The Cognitive Atlas [1] is an ontology for describing cognitive neuroscience concepts and tasks.
References
See also
nimare.extract.download_cognitive_atlas
This function will be called automatically if
ontology_df
is not provided.
Methods
transform
(text[, convert_uk])Replace terms in text with unique Cognitive Atlas identifiers.