robokudo.annotators.cas_check

This module contains methods that allow you to quickly check if a certain condition is met in the CAS. Returns SUCCESS if true, FAILURE otherwise. Never returns RUNNING. For RUNNING, check CASCondition / cas_condition.py

Classes

CASCheckFunc

Check if the return value of a given function is TRUE. Return SUCCESS in this case.

CASCheckAnnotationTypeExists

Return SUCCESS, if an Annotation of a specific RoboKudo Type exists in the CAS.

CASCheckOHExists

Return SUCCESS, if ObjectHypotheses are in the CAS.

Functions

any_of_type_present(annotation_type, cas)

Module Contents

class robokudo.annotators.cas_check.CASCheckFunc(name='CASCheckFunc', func: Callable[[robokudo.cas.CAS], bool] = None, raise_with_str: str = '')

Bases: robokudo.annotators.core.BaseAnnotator

Check if the return value of a given function is TRUE. Return SUCCESS in this case. The func gets access to the CAS.

func = None
raise_with_str = ''
update()

Called every time the behavior is ticked.

robokudo.annotators.cas_check.any_of_type_present(annotation_type, cas: robokudo.cas.CAS)
class robokudo.annotators.cas_check.CASCheckAnnotationTypeExists(name='CASCheckAnnotationTypeExists', annotation_type=None, raise_with_str: str = '')

Bases: CASCheckFunc

Return SUCCESS, if an Annotation of a specific RoboKudo Type exists in the CAS.

class robokudo.annotators.cas_check.CASCheckOHExists(name='CASCheckOHExists', raise_with_str: str = '')

Bases: CASCheckAnnotationTypeExists

Return SUCCESS, if ObjectHypotheses are in the CAS.