Python code and data for the post on word segmentation