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

from ngrams_big import *

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

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

for line in f2:
    n = segment2(line)
    s = " ".join(str(x) for x in n[1])
    f.write(s)
f.close()
