def _convertUnitAsWords(self, unitText):
word_list, a, b = re.split(r"<STR_LIT>", unitText), <NUM_LIT:0>, <NUM_LIT:0><EOL>for word in word_list:<EOL><INDENT>x = self.ptc.small.get(word)<EOL>if x is not None:<EOL><INDENT>a += x<EOL><DEDENT>elif word == "<STR_LIT>":<EOL><INDENT>a *= <NUM_LIT:100><EOL><DEDENT>else:<EOL><INDENT>x = self.ptc.magnitude.get(word)<EOL>if x is not None:<EOL><INDENT>b += a * x<EOL>a = <NUM_LIT:0><EOL><DEDENT>elif word in self.ptc.ignore:<EOL><INDENT>pass<EOL><DEDENT>else:<EOL><INDENT>raise Exception("<STR_LIT>" + word)<EOL><DEDENT><DEDENT><DEDENT>return a + b<EOL>
Converts text units into their number value.

@type  unitText: string
@param unitText: number text to convert

@rtype:  integer
@return: numerical value of unitText