Skip to main content

i have numbers in String format but need to translate to numeric

like below

Original StringNeed to be convert One 1 Two 2 Three 3 Four 4 Five 5 Six 6 Seven 7 Eight 8 Nine 9 Ten 10One Hundred and Fifty Nine 159Five Hundred and Nineteen 519Nine Hundred and Fifty One 951 Two Thousand Four Hundred and Eighty Six 2486 Two Thousand Six Hundred and Eighty Four 2684 Six Thousand Eight Hundred and Forty Two 6842 Eight Thousand Six Hundred and Twenty Four 8624 Eight Thousand Four Hundred and Sixty Two 8462 Thirteen Thousand Five Hundred and Seventy Nine 13579 Thirty One Thousand Five Hundred and Ninety Seven 31597 Fifty Three Thousand One Hundred and Seventy Nine 53179 Seventy Five Thousand Three Hundred and Nineteen 75319 Ninety Seven Thousand Five Hundred and Thirty One 97531

Note: I'm getting value upto 7 digits.

Do you have a demo-dataset of approx 100 records? This sounds like a fun challenge!


Do you have a demo-dataset of approx 100 records? This sounds like a fun challenge!

I have data but it not revealing out so i gave sample records.


There are python examples around for this which you could put into a python caller, e.g.

words_to_numbers.fmwt


@rakeshreddy0996 FME 2020 includes a number or Machine Learning connectors to various Amazon, Google and Azure based NLP packages. Some of these might convert text strings to numbers.


To add on to what @ebygomm suggested, I use the python module word2number. https://pypi.org/project/word2number/

 

 

word_2_number.fmw

 


Reply