Skip to content
Snippets Groups Projects
Commit de9d5206 authored by Carlos Vega's avatar Carlos Vega
Browse files

improved method description docstring

parent ee5e041c
No related branches found
No related tags found
No related merge requests found
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
......@@ -11,15 +12,23 @@ class Publication():
class TextMiningService(metaclass=ABCMeta):
def __init__(self, name: str, description: str):
self.name = name
self.description = description
@abstractmethod
def getMentions(self, entities: List) -> List[Publication]:
"""
Mentions at publication level
def getMentions(self, entities: List[str], limit: int = 20) -> List[Publication]:
"""Returs a list of publications for a given list of entity IDs in which the entities appear.
Arguments:
entities {List[str]} -- [description]
Keyword Arguments:
limit {int} -- [description] (default: {20})
Returns:
List[Publication] -- [description]
"""
pass
......@@ -31,4 +40,3 @@ class TextMiningService(metaclass=ABCMeta):
To-do: decide how to handle resources that can provide co-occurrences at sentence level
"""
pass
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment