Exemplo n.º 1
0
        private static void expandLargeNumber(string text, string word, int num, WordRelation wordRelation)
        {
            int    num2         = String.instancehelper_length(text);
            int    num3         = num2 - num;
            string numberString = String.instancehelper_substring(text, 0, num3);
            Item   tail         = wordRelation.getTail();

            NumberExpander.expandNumber(numberString, wordRelation);
            if (wordRelation.getTail() != tail)
            {
                wordRelation.addWord(word);
            }
            NumberExpander.expandNumberAt(text, num3, wordRelation);
        }
Exemplo n.º 2
0
 private static void expand3DigitNumber(string text, WordRelation wordRelation)
 {
     if (String.instancehelper_charAt(text, 0) == '0')
     {
         NumberExpander.expandNumberAt(text, 1, wordRelation);
     }
     else
     {
         string word = NumberExpander.digit2num[(int)(String.instancehelper_charAt(text, 0) - '0')];
         wordRelation.addWord(word);
         wordRelation.addWord("hundred");
         NumberExpander.expandNumberAt(text, 1, wordRelation);
     }
 }