-
Notifications
You must be signed in to change notification settings - Fork 0
/
sample_text.py
49 lines (39 loc) · 1.02 KB
/
sample_text.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#coding: utf-8
# This file is part of https://github.com/marcus67/rechtschreibung
import six
import spelling_mode
import rulesets
import paragraph01
import paragraph02
import paragraph03
import paragraph04
import sentences
if six.PY3:
from importlib import reload
reload(spelling_mode)
reload(rulesets)
reload(sentences)
reload(paragraph01)
reload(paragraph02)
reload(paragraph03)
reload(paragraph04)
from rulesets import *
def get_sample_text():
return (
paragraph01.paragraph() +
paragraph02.paragraph() +
paragraph03.paragraph() +
paragraph04.paragraph() +
para() + para() +
sentences.sentence1() + sentences.sentence2() + sentences.sentence3() + para() +
sentences.sentence4() + para() +
sentences.sentence5() + para() +
sentences.sentence6())
def test():
rulesets.set_default_mode(rulesets.spelling_mode().combination)
sample_text = get_sample_text()
print (sample_text)
with open("doc/sample_text.txt", "w", encoding="utf-8") as file:
file.write(sample_text)
if __name__ == '__main__':
test()