-
Notifications
You must be signed in to change notification settings - Fork 0
pbj_tools
Sean Finan edited this page Sep 19, 2024
·
1 revision
def create_relation(cas, relation_type, category, source, target):
Create and add a Type
def create_type(cas, type_name, begin, end):
Add a type. If a known type is repeatedly added then it is faster to get the type from the type system once and call this function repeatedly with the given type.
def add_type(cas, type_type, begin, end):
def create_annotations(cas, type_name, offsets_list):
def create_event(self, cas, dtr):
def create_event_mention(self, cas, dtr):
def get_annotation_at_offset(annotations, a_begins, wanted_begin):
def get_annotation_type_at_offset(annotations, a_begins, wanted_begin, wanted_type):
def get_or_create_event_mention(cas, annotations, a_begins, wanted_begin, wanted_type, end):
def get_or_create_procedure_mention(cas, annotations, a_begins, wanted_begin, wanted_type, end):
def get_or_create_sign_symptom_mention(cas, annotations, a_begins, wanted_begin, wanted_type, end):
def get_or_create_disease_disorder_mention(cas, annotations, a_begins, wanted_begin, wanted_type, end):
def get_or_create_medication_mention(cas, annotations, a_begins, wanted_begin, wanted_type, end):
def get_or_create_anatomic_mention(cas, annotations, a_begins, wanted_begin, wanted_type, end):
gets offsets
def get_offsets(annotations):
gets windowed offsets
def get_windowed_offsets(annotations, window_offset):
gets event mentions
def get_event_mention(cas, e_mentions, e_m_begins, begin, end):
gets covered list
def get_covered_list(to_cover_with, to_cover):
gets document ID
def get_document_id(cas):
Gets token index by the offset
def get_token_index_by_offset(tokens, s_begin):
Gets token by offset
def get_token_by_offset(tokens, s_begin):