kazu.ontology_preprocessing.autocuration¶
Functions
If a synonym starts with a lowercase character followed by an uppercase character, then all synonyms should be case-sensitive. |
|
|
Make Resources where all original synonyms are all uppercase alphabetical characters case-insensitive. |
|
If any synonym has more than one words, it's likely a noun phase and we should mark all synonyms PROBABLE. |
Classes
If all synonyms are less than or equal to the specified length, and are all upper case, give a confidence of POSSIBLE to all forms. |
|
Drop resources that exceed a maximum string length. |
|
- class kazu.ontology_preprocessing.autocuration.AutoCurationAction[source]¶
Bases:
Protocol
- __call__(resource)[source]¶
Call self as a function.
- Parameters:
resource (OntologyStringResource)
- Return type:
- class kazu.ontology_preprocessing.autocuration.AutoCurator[source]¶
Bases:
object
- __call__(resources)[source]¶
Call self as a function.
- Parameters:
resources (set[OntologyStringResource])
- Return type:
- __init__(actions)[source]¶
- Parameters:
actions (list[AutoCurationAction])
- Return type:
None
- class kazu.ontology_preprocessing.autocuration.IsCommmonWord[source]¶
Bases:
AutoCurationAction
- __call__(resource)[source]¶
Call self as a function.
- Parameters:
resource (OntologyStringResource)
- Return type:
- class kazu.ontology_preprocessing.autocuration.LikelyAcronym[source]¶
Bases:
AutoCurationAction
If all synonyms are less than or equal to the specified length, and are all upper case, give a confidence of POSSIBLE to all forms.
- __call__(resource)[source]¶
Call self as a function.
- Parameters:
resource (OntologyStringResource)
- Return type:
- class kazu.ontology_preprocessing.autocuration.MaxLength[source]¶
Bases:
AutoCurationAction
Drop resources that exceed a maximum string length.
- __call__(resource)[source]¶
Call self as a function.
- Parameters:
resource (OntologyStringResource)
- Return type:
- class kazu.ontology_preprocessing.autocuration.MinLength[source]¶
Bases:
AutoCurationAction
- __call__(resource)[source]¶
Call self as a function.
- Parameters:
resource (OntologyStringResource)
- Return type:
- class kazu.ontology_preprocessing.autocuration.SymbolicToCaseSensitiveAction[source]¶
Bases:
AutoCurationAction
- __call__(resource)[source]¶
Call self as a function.
- Parameters:
resource (OntologyStringResource)
- Return type:
- kazu.ontology_preprocessing.autocuration.initial_lowercase_then_upper_to_case_sensitive(resource)[source]¶
If a synonym starts with a lowercase character followed by an uppercase character, then all synonyms should be case-sensitive.
E.g. “eGFR” vs “EGFR”.
- Parameters:
resource (OntologyStringResource)
- Returns:
- Return type:
- kazu.ontology_preprocessing.autocuration.is_upper_case_word_to_case_insensitive(resource)[source]¶
Make Resources where all original synonyms are all uppercase alphabetical characters case-insensitive.
Some data sources use all-caps strings for nouns that can be considered case- insensitive (e.g. Chembl).
- Parameters:
resource (OntologyStringResource)
- Returns:
- Return type:
- kazu.ontology_preprocessing.autocuration.multiword(resource)[source]¶
If any synonym has more than one words, it’s likely a noun phase and we should mark all synonyms PROBABLE.
- Parameters:
resource (OntologyStringResource)
- Returns:
- Return type: