blob: a865a4954f876d96813af180812f2a13bd789b4f [file] [log] [blame]
Akronb6efc732022-03-17 15:03:56 +01001import Cutter
2import sys
3
4sys.setrecursionlimit(100000)
5
6cutter = Cutter.Cutter(profile='de')
7
8sent = sys.argv[1]
9
10file = open(sys.argv[2], 'r')
11
12text = file.read()
13
14file.close()
15
16for token in cutter.cut(text):
17 if token[0]:
18 print(token[0])
19
20 if sent == "sent":
21 if token[1].startswith("+EOS"):
22 print("</eos>")