blob: a865a4954f876d96813af180812f2a13bd789b4f [file] [log] [blame]
import Cutter
import sys
sys.setrecursionlimit(100000)
cutter = Cutter.Cutter(profile='de')
sent = sys.argv[1]
file = open(sys.argv[2], 'r')
text = file.read()
file.close()
for token in cutter.cut(text):
if token[0]:
print(token[0])
if sent == "sent":
if token[1].startswith("+EOS"):
print("</eos>")