I have a string as below
"i am genie. who are you? we worked together in a hotel called xsis."
Normally string like the above is cleaned. Cleaning involves removing whitespaces. Thus the cleaned version of the above string would be
It is divided into kgrams of fixed size. Assuming size of kgram as five, the kgrams for the above string would be
'iamge', 'amgen', 'mgeni', 'genie', ... , 'isiam', 'siamg'
I want to display the actual text in the original string depending on the kgram chosen. For instance, if kgram 'iamge' is chosen, the output would be 'i am ge'. Please suggest me, if possible with a python implementation. Thanking you in advance.