title: voice recognition algorithm to convert number
body: <p>I was making voice commanded calculator..in that I prestored some of the voicedata of<br>
  (1 to 9),(10 ,20 --90),(hundred ,thousand, lakh).
  if I want to calculate 1234+45678<br>
   I need to say ""one thousand two hundred thirty four plus forty five thousand six hundred seventy eight"<br>
  my voice recognition system recognize it as {1,1000,2,100,40,4,}+{40,5,1000,6,100,70,8}<br>
  but I don't know how to write the program to calculate the above problem. I hope you understood my problem and found one better solution for that..
  I have planned one solution but it having some loop holes
  in that first bracket it </p>
  
  <blockquote>
    <p>rule 1: multiply the consecutive numbers and add the result,<br>
    rule 2: if the first number in the consecutive groups is found to be
    10,20,30,40...90.it will add to the next number in that consecutive
    instead of multiplying<br>
    rule 3: it will continue until it found any
    symbols like (+,-*,/) ,like this (1*1000)+(2*100)+(30+4)=1234
    similarly second bracket and add the result</p>
  </blockquote>
  
  <p>I was not satisfied with the above procedure so,please try to find the better solution. I will be very thankful to you.</p>
  
  <p>If it is not clear with my problem leave it in the comments I will try to explain my level best.</p>