The code is written in Python
Several keywords and key modifiers are changed into named entities. They are used to indicate if the document considered as a candidate for the further analysis. After extracting those entities through the document, true positive case is filtered by addressing negation. Appropriate drug use case is excluded by looking at terms indicating a purpose of use.