http://qs321.pair.com?node_id=506177


in reply to Re^2: Converting words to numbers with HOP::Parser
in thread Converting words to numbers with HOP::Parser

Well with a quick regex you should be able to just grab out portions of text that it will be able to match to numbers. Then you could turn something like "divide three by seven and add twelve point two" into "divide 3 by 7 and 12.2", then you just have to manage the new portions. Frankly the parser version makes no sense at all to me and I have no idea what it is doing at all. A quick (realy quick) explanation might go along way for those of us who haven't read HOP, though I get more and more curious about HOP as these posts come out.


___________
Eric Hodges $_='y==QAe=e?y==QG@>@?iy==QVq?f?=a@iG?=QQ=Q?9'; s/(.)/ord($1)-50/eigs;tr/6123457/- \/|\\\_\n/;print;
  • Comment on Re^3: Converting words to numbers with HOP::Parser