Skip to content

Write a module to return "midfix" of a sentence.  #20

@ShaswatLenka

Description

@ShaswatLenka

Write a method-like (methods belong to a class) module getMidfix(*args) that takes a sentence and returns the midfix of the sentence. midfix is the part of the sentence that is between the prefix and the postfix. The prefix is always a drug name and the postfix is always an ADR, irrespective of where they appear in a sentence. You are provided with a dictionary of the following structure: {drug_name : list(adr_1,adr_2,...adr_n)}. with type: {str:list(str,str...,str)}.
Note that the ADRs encountered in the tweets might not always be well defined in the ADR list already provided to you. You are required to find a solution that is able to successfully extract the midfix(or an equivalent sentence containing a midfix with least error) if such a situation arises.
All the modules go into the /modules directory.

Metadata

Metadata

Assignees

Labels

featurenew featurehigh priorityThis should be considered to be on top of your TODO listsmodulecreate a module

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions