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

implemented get_co_occurrences for the DummyService

parent a4b45c98
No related branches found
No related tags found
No related merge requests found
......@@ -12,10 +12,16 @@ class DummyService(TextMiningService):
super().__init__("DummyService", "Service that returns dummy results")
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(limit)]
def get_co_occurrences(self, entity: str, limit: int = 20, types: List[str] = None) -> List[CoOccurrence]:
pass
values = []
for idx in range(limit):
entity_code = str(idx)
count = int(idx*idx)
co_occur = CoOccurrence(entity_code, count)
values.append(co_occur)
return values
if __name__ == '__main__':
......
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