how to do word splitting

if i give buynow it should give buy now

if i give worldtraveltour then world travel tour

if i give domainsitea it should give domain site a

etc

any dictionary tools , class files are available for this task ?

thanks