Exemple #1
0
 public static void expandNumess(string rawString, WordRelation wordRelation)
 {
     if (String.instancehelper_length(rawString) == 4)
     {
         NumberExpander.expand2DigitNumber(String.instancehelper_substring(rawString, 0, 2), wordRelation);
         NumberExpander.expandNumess(String.instancehelper_substring(rawString, 2), wordRelation);
     }
     else
     {
         wordRelation.addWord(NumberExpander.digit2Numness[(int)(String.instancehelper_charAt(rawString, 0) - '0')]);
     }
 }
Exemple #2
0
        public static void expandNumber(string numberString, WordRelation wordRelation)
        {
            int num = String.instancehelper_length(numberString);

            if (num != 0)
            {
                if (num == 1)
                {
                    NumberExpander.expandDigits(numberString, wordRelation);
                }
                else if (num == 2)
                {
                    NumberExpander.expand2DigitNumber(numberString, wordRelation);
                }
                else if (num == 3)
                {
                    NumberExpander.expand3DigitNumber(numberString, wordRelation);
                }
                else if (num < 7)
                {
                    NumberExpander.expandBelow7DigitNumber(numberString, wordRelation);
                }
                else if (num < 10)
                {
                    NumberExpander.expandBelow10DigitNumber(numberString, wordRelation);
                }
                else if (num < 13)
                {
                    NumberExpander.expandBelow13DigitNumber(numberString, wordRelation);
                }
                else
                {
                    NumberExpander.expandDigits(numberString, wordRelation);
                }
            }
        }