diff --git a/interface/TextMiningService.py b/interface/TextMiningService.py new file mode 100644 index 0000000000000000000000000000000000000000..981c58468507111417f7a4c7a2b27d1ce1b10e81 --- /dev/null +++ b/interface/TextMiningService.py @@ -0,0 +1,30 @@ +from abc import ABCMeta, abstractmethod +from typing import List + +class Publication(): + def __init__(self, pmc_id, pm_id, doi, preprint_id, other_id): + self.pmc_id = pmc_id + self.pm_id = pm_id + self.doi = doi + self.preprint_id = preprint_id + self.other_id = other_id + + +class TextMiningService(metaclass=ABCMeta): + + def __init__(self, name: str, description: str): + self.name = name + self.description = description + + @abstractmethod + def getMentions(entities: List) -> List[Publication]: + pass + + @abstractmethod + def getCoOccurrences(entity: str) -> List[str]: + pass + + + + +