Skip to content
Snippets Groups Projects
Commit 86307759 authored by Valentin Groues's avatar Valentin Groues :eyes:
Browse files

add missing limit parameter

parent d5a331db
No related branches found
No related tags found
No related merge requests found
...@@ -2,6 +2,7 @@ import logging ...@@ -2,6 +2,7 @@ import logging
from typing import List from typing import List
from interface.TextMiningService import TextMiningService, Publication from interface.TextMiningService import TextMiningService, Publication
from models.coocurrence import CoOccurrence
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
...@@ -13,7 +14,7 @@ class DummyService(TextMiningService): ...@@ -13,7 +14,7 @@ class DummyService(TextMiningService):
def get_mentions(self, entities: List, limit: int = 20) -> List[Publication]: def get_mentions(self, entities: List, limit: int = 20) -> List[Publication]:
return [Publication(pm_id="00000" + str(i)) for i in range(20)] return [Publication(pm_id="00000" + str(i)) for i in range(20)]
def get_co_occurrences(self, entity: str) -> List[str]: def get_co_occurrences(self, entity: str, limit: int = 20) -> List[CoOccurrence]:
pass pass
......
...@@ -29,7 +29,7 @@ class JensenLabService(TextMiningService): ...@@ -29,7 +29,7 @@ class JensenLabService(TextMiningService):
publications_ids_intersection = set.intersection(*publications_ids) publications_ids_intersection = set.intersection(*publications_ids)
return [Publication(pm_id=pid) for pid in publications_ids_intersection] return [Publication(pm_id=pid) for pid in publications_ids_intersection]
def get_co_occurrences(self, entity: str) -> List[str]: def get_co_occurrences(self, entity: str, limit: int = 20) -> List[str]:
pass pass
@staticmethod @staticmethod
......
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