aoptk.relationships.find_relationship

Classes

FindRelationship

Interface for finding relationships in text.

Module Contents

class aoptk.relationships.find_relationship.FindRelationship[source]

Bases: abc.ABC

Interface for finding relationships in text.

abstractmethod find_relationships_in_text(text: str, chemicals: list[aoptk.chemical.Chemical], effects: list[aoptk.effect.Effect]) list[aoptk.relationships.relationship.Relationship][source]

Find relationships between chemicals and effects in the given text.

abstractmethod find_relationships_in_table(table_df: pandas.DataFrame, effects: list[aoptk.effect.Effect]) list[aoptk.relationships.relationship.Relationship][source]

Find relationships between chemicals and effects in the given table data.

abstractmethod find_relationships_in_text_and_images(text: str, image_paths: list[str], effects: list[aoptk.effect.Effect]) list[aoptk.relationships.relationship.Relationship][source]

Find relationships between chemicals and effects in the given text and images combined.