Jump to content

  • Log In with Google      Sign In   
  • Create Account

#ActualEctara

Posted 03 March 2013 - 10:06 AM

couldn't you ignore punctuation and do something like "if (input_string.contains("twelve") then ++twelve_counter"?

If you know your input precisely (and probably already know how many of each word).

Otherwise, you could easily catch words that appear in a longer, different word, resulting in erroneous counts.


#1Ectara

Posted 03 March 2013 - 10:05 AM

couldn't you ignore punctuation and do something like "if (input_string.contains("twelve") then ++twelve_counter"?

If you know your input precisely (and probably already know how many of each word).

Otherwise, you could easily catch words that appear in a longer, different word, resulting erroneous counts.


PARTNERS