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

added get_co_occurrences to the dummy class

parent f746a9a0
No related branches found
No related tags found
No related merge requests found
......@@ -17,7 +17,7 @@ class DummyService(TextMiningService):
def get_co_occurrences(self, entity: str, limit: int = 20, types: List[str] = None) -> List[CoOccurrence]:
values = []
for idx in range(limit):
entity_code = str(idx)
entity_code = f'{entity}_{idx}'
count = int(idx*idx)
co_occur = CoOccurrence(entity_code, count)
values.append(co_occur)
......@@ -29,3 +29,5 @@ if __name__ == '__main__':
print("Using service {}".format(text_mining_service.name))
publications = text_mining_service.get_mentions(["DOID:0000"])
print(", ".join([p.pm_id for p in publications]))
cooccurrences = text_mining_service.get_co_occurrences('DOID:0000')
print(cooccurrences)
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