From 520e33270aa632fb82a8a1d36035c942518a991a Mon Sep 17 00:00:00 2001 From: Carlos Vega <carlos.vega@uni.lu> Date: Tue, 19 Nov 2019 09:57:41 +0100 Subject: [PATCH] first draft --- interface/TextMiningService.py | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 interface/TextMiningService.py diff --git a/interface/TextMiningService.py b/interface/TextMiningService.py new file mode 100644 index 0000000..981c584 --- /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 + + + + + -- GitLab