Source code for aoptk.find_chemical

from __future__ import annotations
from abc import ABC
from abc import abstractmethod
from typing import TYPE_CHECKING

if TYPE_CHECKING:
    from aoptk.chemical import Chemical


[docs] class FindChemical(ABC): """Interface for finding chemicals in text.""" @abstractmethod
[docs] def find_chemicals(self, sentence: str) -> list[Chemical]: """Find chemicals in the given sentence."""