-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathwords.py
More file actions
151 lines (112 loc) · 3.65 KB
/
Copy pathwords.py
File metadata and controls
151 lines (112 loc) · 3.65 KB
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# coding: utf-8
# This file is part of https://github.com/marcus67/rechtschreibung
"""
This module supplies shortcuts for frequently used words. It's not really required anymore after
the introduction of the sentence_parser.py module but most of the existing sentence functions rely
on these shortcuts. It *may* eventually go away.
"""
import six
import rulesets
import spelling_mode
from rule_decorator import *
if six.PY3:
from importlib import reload
reload(rulesets)
reload(spelling_mode)
from rulesets import *
from spelling_mode import *
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def abbrechen(c=0):
return a(c)+b(m=VOICELESS)+b()+r()+e()+ch()+e()+n()
@RuleDecorator(p_conditions = COND_BOW)
def aus(c=0):
return au(c)+s()
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def bei(c=0):
return b(c)+ei()
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def casimir(c=0):
return rulesets.c(c=C_NAME|c)+a()+s()+i()+m()+i()+r()
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def dass(c=0):
return d(c)+a()+sz(m=EOW)
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def das(c=0):
return d(c)+a()+s(m=ACTUALLY_SHORT)
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def dem(c=0):
return d(c)+e(m=ACTUALLY_ELONGATED)+m()
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def den(c=0):
return d(c)+e(m=ACTUALLY_ELONGATED)+n()
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def der(c=0):
return d(c)+e()+r()
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def die(c=0):
return d(c)+ie()
@RuleDecorator(p_conditions = COND_BOW)
def ein(c=0):
return ei(c) + n()
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def eine(c=0):
return ein(c) + e()
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def einen(c=0):
return eine(c) + n()
@RuleDecorator(p_conditions = COND_EOW)
def end(c=0):
return e(c)+n()+d(m=VOICELESS)
@RuleDecorator(p_pattern = u"für", p_conditions = COND_SEPERATED_WORD)
def fuer(c=0):
return f()+uuml()+r()
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def ist(c=0):
return i(c)+s()+t()
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def hat(c=0):
return h(c)+a()+t()
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def man(c=0):
return m(c)+a()+n(m=ACTUALLY_SHORT)
@RuleDecorator(p_conditions = COND_BOW)
def mit(c=0):
return m(c)+i()+t(m=ACTUALLY_SHORT)
@RuleDecorator(p_pattern = u"schließen", p_conditions = COND_EOW)
def schlieszen(c=0):
return sch(c)+l()+ie()+sz()+e()+n()
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def sich(c=0):
return s(c)+i()+ch()
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def sie(c=0):
return s(c)+ie()
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def sind(c=0):
return s(c)+i()+n()+d(m=VOICELESS)
@RuleDecorator(p_conditions = COND_EOW)
def speichern(c=0):
return sp(c)+ei()+ch()+e()+r()+n()
@RuleDecorator(p_pattern = u"überschreiben", p_conditions = COND_SEPERATED_WORD)
def ueberschreiben(c=0):
return uuml(c)+b()+er()+sch()+r()+ei()+b()+e()+n()
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def und(c=0):
return u(c)+n()+d(m=VOICELESS)
@RuleDecorator(p_conditions = COND_BOW)
def viel(c=0):
return v(c, m=VOICELESS)+ie()+l()
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def von(c=0):
return v(c, m=VOICELESS)+o()+n()
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def wie(c=0):
return w(c)+ie()
@RuleDecorator(p_conditions = COND_SEPERATED_WORD)
def wendy(c=0):
return w(c=C_NAME|c)+e()+n()+d()+y(m=Y_I)
def test():
rulesets.set_default_mode(rulesets.spelling_mode().combination)
print (casimir()+das()+der()+die()+ist()+sind()+und()+wendy())
if __name__ == '__main__':
test()