def checkIfSymptomAndSideEffectMentioned(self, sentence, argExtractor):
        symtomStatements = ['side-effects', 'side effects', 'symptoms', 'symptom']

        # Extract the words preceeding the symptomStatement keyword
        preceedingSentence = ''
        sideEffectStatus = ''
        sideEffectFound = False

        # TODO: Find out if it's useful to have contractions removed when looking for symtpoms
        listOfContractions = argExtractor.getListOfContractions()
        expandedSentence = messageCleaner.replaceWordContractions(sentence, listOfContractions)

        for symptomStatement in symtomStatements:

            indexOfSymptomKeyWord = expandedSentence.find(symptomStatement)

            if indexOfSymptomKeyWord == -1:
                continue
        
            else:
                sideEffectFound = True

        if not sideEffectFound:
            return (sideEffectFound, sideEffectStatus)

        listOfSymptoms = argExtractor.getListOfSymptoms()

        for symptom in listOfSymptoms:

            lowerCaseSymp = symptom.lower()
            if lowerCaseSymp in expandedSentence:
                sideEffectStatus = 'Side effects Present - because symptoms mentioned'
                return (sideEffectFound, sideEffectStatus)
        
        return (False, sideEffectStatus)
    def checkForInverterWordInPreceedingSentence(self, sentence, argExtractor):

        #TODO: Work on an NLTK contractions aclass to filer out words like not etc

        symtomStatements = [
            'side-effects', 'side effects', 'symptoms', 'symptom'
        ]

        # Extract the words preceeding the symptomStatement keyword
        preceedingSentence = ''
        sideEffectStatus = ''

        listOfContractions = argExtractor.getListOfContractions()
        expandedSentence = messageCleaner.replaceWordContractions(
            sentence, listOfContractions)

        for symptomStatement in symtomStatements:

            indexOfSymptomKeyWord = expandedSentence.find(symptomStatement)

            if indexOfSymptomKeyWord == -1:
                continue

            # We pull out the preceeeding sentence. We have a -1 here in the final index range so that we can remove the space before the key symptom word
            preceedingSentence = expandedSentence[0:(indexOfSymptomKeyWord -
                                                     1)]
            break

        # This means we could not find the key word from the side effects list
        if preceedingSentence == '':
            return (False, sideEffectStatus)

        try:
            taggedSentence = naturalLanguageWhiz.tag(preceedingSentence)
            if len(taggedSentence) <= 0:
                return (False, sideEffectStatus)
        except:
            logger.exception('Error when running checkForMentionOfNoSymptoms')
            return (False, sideEffectStatus)

        result = argExtractor.checkIfInverterWordInSentence(taggedSentence)

        if result == True:
            sideEffectStatus = 'Possibly no side effects'
            return (True, sideEffectStatus)
        else:
            sideEffectStatus = 'Side effects Present - because no preceeding inverterword'
            return (False, sideEffectStatus)
    def checkForInverterWordInPreceedingSentence(self, sentence, argExtractor):

        #TODO: Work on an NLTK contractions aclass to filer out words like not etc 

        symtomStatements = ['side-effects', 'side effects', 'symptoms', 'symptom']

        # Extract the words preceeding the symptomStatement keyword
        preceedingSentence = ''
        sideEffectStatus = ''

        listOfContractions = argExtractor.getListOfContractions()
        expandedSentence = messageCleaner.replaceWordContractions(sentence, listOfContractions)

        for symptomStatement in symtomStatements:

            indexOfSymptomKeyWord = expandedSentence.find(symptomStatement)

            if indexOfSymptomKeyWord == -1:
                continue

            # We pull out the preceeeding sentence. We have a -1 here in the final index range so that we can remove the space before the key symptom word
            preceedingSentence = expandedSentence[0:(indexOfSymptomKeyWord - 1)]
            break

        # This means we could not find the key word from the side effects list
        if preceedingSentence == '':
            return (False, sideEffectStatus)

        try:
            taggedSentence = naturalLanguageWhiz.tag(preceedingSentence)
            if len(taggedSentence) <= 0:
                return (False, sideEffectStatus)
        except:
            logger.exception('Error when running checkForMentionOfNoSymptoms')
            return (False, sideEffectStatus)

        result = argExtractor.checkIfInverterWordInSentence(taggedSentence)

        if result == True:
            sideEffectStatus = 'Possibly no side effects'
            return (True, sideEffectStatus)
        else:
            sideEffectStatus = 'Side effects Present - because no preceeding inverterword'
            return (False, sideEffectStatus)
    def checkIfSymptomAndSideEffectMentioned(self, sentence, argExtractor):
        symtomStatements = [
            'side-effects', 'side effects', 'symptoms', 'symptom'
        ]

        # Extract the words preceeding the symptomStatement keyword
        preceedingSentence = ''
        sideEffectStatus = ''
        sideEffectFound = False

        # TODO: Find out if it's useful to have contractions removed when looking for symtpoms
        listOfContractions = argExtractor.getListOfContractions()
        expandedSentence = messageCleaner.replaceWordContractions(
            sentence, listOfContractions)

        for symptomStatement in symtomStatements:

            indexOfSymptomKeyWord = expandedSentence.find(symptomStatement)

            if indexOfSymptomKeyWord == -1:
                continue

            else:
                sideEffectFound = True

        if not sideEffectFound:
            return (sideEffectFound, sideEffectStatus)

        listOfSymptoms = argExtractor.getListOfSymptoms()

        for symptom in listOfSymptoms:

            lowerCaseSymp = symptom.lower()
            if lowerCaseSymp in expandedSentence:
                sideEffectStatus = 'Side effects Present - because symptoms mentioned'
                return (sideEffectFound, sideEffectStatus)

        return (False, sideEffectStatus)