save segmented words to file