module.exports = function (ruleManager, sentence, result) {
    if (result.tokenIndices &&
        result.tokenIndices.length) {

        // 
        // var phrase_name = null;
        //var phrase_names = ["qtags_not_option", "qtags_nt_option"];
        let phrase = "";

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