// check if an Arabic number or digit
        public static bool IsDigit(string inToken)
        {
            bool checkEmptyTokenFlag = true;
            // can not be pure puntuation, such as "-" or "+"
            bool digitFlag = ((IsPunc(inToken) == false) && (TokenUtil.IsMatch(inToken, patternD_, checkEmptyTokenFlag)));

            return(digitFlag);
        }
        private static bool IsParentheticPluralIes(string inToken)
        {
            bool flag = false;

            if (TokenUtil.IsMatch(inToken, patternIes_) == true)
            {
                flag = true;
            }
            return(flag);
        }
        // true: if meet possessive pattern
        // private method
        private static bool IsParentheticPluralS(string inToken)
        {
            bool flag = false;

            if ((TokenUtil.IsMatch(inToken, patternS_) == true) && (TokenUtil.IsMatch(inToken, patternS1_) == false) && (TokenUtil.IsMatch(inToken, patternS2_) == false))
            {
                flag = true;
            }
            return(flag);
        }
Exemple #4
0
        private static bool IsPossessivePattern2(string inToken)
        {
            bool flag = false;

            // check if ends with possessive
            // upperCase: 'S, S', X', Z'
            if ((TokenUtil.IsMatch(inToken, pattern2a_) == true) || (TokenUtil.IsMatch(inToken, pattern2b_) == true))
            {
                flag = true;
            }
            return(flag);
        }
        public static bool IsPunc(string inToken)
        {
            bool checkEmptyTokenFlag = true;

            return(TokenUtil.IsMatch(inToken, patternP_, checkEmptyTokenFlag));
        }