Python library to break text into words

Dietmar Schwertberger maillist at schwertberger.de
Thu May 31 17:09:58 EDT 2018


On 5/31/2018 10:26 PM, beliavsky--- via Python-list wrote:
> Is there a Python library that uses intelligent guesses to break sequences of characters into words? The general strategy would be to break strings into the longest words possible. The library would need to "know" a sizable subset of words in English.

No need to re-invent the wheel:

import webbrowswer
webbrowser.open( 
"https://www.google.com/search?q=%s"%"atomicaccidents.pdf"+"+amazon", new=0)


Copy the title from the browser window and paste it into your script's 
window which will read it with input() and rename the file.

Regards,

Dietmar





More information about the Python-list mailing list