-1

Supposing that I've the following strings:

  • "myteststringwithoutanyspace"
  • "myOtherSTRINGwithoutanyspace"

How would you separate the words inside it in Java?

My current strategy is focused using SimpleNLG. But in fact, I didn't find any docs about using SimpleNLG to separate strings into words.

Tunaki
  • 132,869
  • 46
  • 340
  • 423
Sergio Figueras
  • 297
  • 1
  • 6
  • 18
  • check this [question](http://stackoverflow.com/questions/8870261/how-to-split-text-without-spaces-into-list-of-words) – David Batista May 31 '16 at 10:47
  • [This one](http://stackoverflow.com/questions/9665501/word-splitting-statistical-approach/9688034#9688034) might also be relevant – AaronD Jun 15 '16 at 22:50

1 Answers1

0

Well, your solution will almost never be perfect.

I would approach it by getting an English dictionary file, sort by length, then sort by amount of use, and then match it in the string, as I see it, that would be the only option.

Vilsol
  • 722
  • 1
  • 7
  • 17