Convert numbers written in words to numeric in a sentence

example_input <- paste0("I have ten apple and one orange")
my challenge is to convert ten and one which is in words to numbers as 10 and 1 in the input sentence

  • Numbers may change based on user requirement
  • Input sentence can be tokenized

my_output_toget<-paste("I have 10 apple and 1 orange")

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.