I have a list in Python like this:
`list = ['thatCreation', 'happeningso', '’', 'comebecause',]
Question :
I want specific words:
For e.g. -> 'thatCreation' -> 'that', 'creation'
'happeningso' -> 'happening', 'so'
'comebeacause' -> 'come', 'because' `
Thanks in advance for solving it in python.
It looks like you are trying to take words merged together in camel case and break it apart. There is a great algorithm called Viterbi that does this really well.
I can't explain the magic behind it, but I implemented it in my program recently and it works really well. My understanding is it calculates the probability of each word and splits on that. This algorithm can split words in any case.
You need a dictionary of a ton of words, there are multiple out there, but I used: https://raw.githubusercontent.com/first20hours/google-10000-english/master/google-10000-english-no-swears.txt
and updated it with new words that it didn't have.