package org.studiorailgun.ai.conversation.parser;

/**
 * The Penn Treebank Tag Set
 */
public class PennTreebankTagSet {
    
    /**
     * Checks if this tag is a verb or not
     * @param tag The tag
     * @return true if it is a verb, false otherwise
     */
    public static boolean isVerb(String tag){
        switch(tag){
            case "VB":
            case "VBD":
            case "VBG":
            case "VBN":
            case "VBP":
            case "VBZ":
            case "VH":
            case "VHD":
            case "VHG":
            case "VHN":
            case "VHP":
            case "VHZ":
            case "VV":
            case "VVD":
            case "VVG":
            case "VVN":
            case "VVP":
            case "VVZ": {
                return true;
            }
            default: {
                return false;
            }
        }
    }

    /**
     * Checks if this tag is a form of "to be" or not
     * @param tag The tag
     * @return true if it is a form of "to be", false otherwise
     */
    public static boolean isBe(String tag){
        switch(tag){
            case "VB":
            case "VBD":
            case "VBG":
            case "VBN":
            case "VBP":
            case "VBZ": {
                return true;
            }
            default: {
                return false;
            }
        }
    }

    /**
     * Checks if this tag is a noun or not
     * @param tag The tag
     * @return true if it is a noun, false otherwise
     */
    public static boolean isNoun(String tag){
        switch(tag){
            case "NN":
            case "NNS":
            case "NP":
            case "NPS":
            case "NNP": {
                return true;
            }
            default: {
                return false;
            }
        }
    }

    /**
     * Checks if this is a proper noun or not
     * @param tag The tag
     * @return true if it is a proper noun, false otherwise
     */
    public static boolean isCommonNoun(String tag){
        switch(tag){
            case "NN":
            case "NNS": {
                return true;
            }
            default: {
                return false;
            }
        }
    }

    /**
     * Checks if this tag is a proper noun or not
     * @param tag The tag
     * @return true if it is a proper noun, false otherwise
     */
    public static boolean isProperNoun(String tag){
        switch(tag){
            case "NP":
            case "NPS":
            case "NNP": {
                return true;
            }
            default: {
                return false;
            }
        }
    }

    /**
     * Checks if this tag is a pronoun or not
     * @param tag The tag
     * @return true if it is a pronoun, false otherwise
     */
    public static boolean isPronoun(String tag){
        switch(tag){
            case "PRP":
            case "PRP$": {
                return true;
            }
            default: {
                return false;
            }
        }
    }

}
