convert numbers in alphabet form to integer

Certified Senior Developer

HI All,

Example -- I am forty-five years old.

from above text i need to get 45 in integer form. How to achieve this?

Thanks,

Ganesh. 

  Discussion posts and replies are publicly visible

Parents
  • To achieve this, you can use the Python library word2number. It converts written numbers like "forty-five" into integers like 45. For example, using w2n.word_to_num("forty-five") returns 45. Split your text into words, process each word, and extract numeric values. This approach works well for simple cases. For students looking for an online platform to help with educational assignments, I discovered a website called https://domypaper.com/ domypaper. It has been very useful to me, and I have been using their service for a couple of years. domypaper provides expert writers who deliver high-quality research papers for students. They also offer professional tutors who assist users in understanding various topics.

Reply
  • To achieve this, you can use the Python library word2number. It converts written numbers like "forty-five" into integers like 45. For example, using w2n.word_to_num("forty-five") returns 45. Split your text into words, process each word, and extract numeric values. This approach works well for simple cases. For students looking for an online platform to help with educational assignments, I discovered a website called https://domypaper.com/ domypaper. It has been very useful to me, and I have been using their service for a couple of years. domypaper provides expert writers who deliver high-quality research papers for students. They also offer professional tutors who assist users in understanding various topics.

Children
No Data