#!/usr/bin python3
# -*- coding: utf-8 -*-

from ngrams import *

#for given set
#f = open('outputs/wordgen.txt', "w")
#f2 = open('../wordseg.txt', "r")

#for validation set
f = open('outputs/wordgen_val.txt', "w")
f2 = open('../wordseg_val.txt', "r")

for line in f2:
    n = segment(line)
    s = " ".join(str(x) for x in n)
    f.write(s)
f.close()
