'use strict';

module.exports = function (ruleManager, sentence, result) {
    if (result.tokenIndices &&
        result.tokenIndices.length) {
        //var phrase_name = "qtags_without_not";
        let phrase = null;

        for (let ti = 0; ti < result.tokenIndices.length; ti++) {
            let token = sentence.tokens[result.tokenIndices[ti]];
            if (token.qtags_without_not) {
                phrase = token.qtags_without_not;
                // debugger;
                ti = result.tokenIndices.length;
                break;
            }
        }
        if (!phrase) {
            debugger;
            return false;
        }
        return ruleManager.functions.qtag_validity_neg_affirm(ruleManager, sentence, result, phrase);
    }
}