本文整理汇总了Python中pattern.text.Verbs类的典型用法代码示例。如果您正苦于以下问题:Python Verbs类的具体用法?Python Verbs怎么用?Python Verbs使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Verbs类的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __init__
def __init__(self):
_Verbs.__init__(self, os.path.join(MODULE, "de-verbs.txt"),
language="de",
format=[0, 1, 2, 3, 4, 5, 8, 17, 18, 19, 20, 21,
24, 52, 54, 53, 55, 56, 58, 59, 67, 68, 70, 71],
default={6: 4, 22: 20, 57: 55, 60: 58, 69: 67, 72: 70}
)
示例2: load
def load(self):
_Verbs.load(self)
self._inverse["was"] = "zijn" # Instead of "wassen".
self._inverse["waren"] = "zijn"
self._inverse["zagen"] = "zien"
self._inverse["wist"] = "weten"
self._inverse["zou"] = "zullen"
示例3: __init__
def __init__(self):
_Verbs.__init__(self, os.path.join(MODULE, "xx-verbs.txt"),
language = "xx",
# The order of tenses in the given file; see pattern.text.__init__.py => Verbs.
format = [0, 1, 2, 3, 7, 8, 17, 18, 19, 23, 25, 24, 16, 9, 10, 11, 15, 33, 26, 27, 28, 32],
default = {}
)
示例4: __init__
def __init__(self):
_Verbs.__init__(
self,
os.path.join(MODULE, "fr-verbs.txt"),
language="fr",
default={},
format=[
0,
1,
2,
3,
4,
5,
6,
8,
24, # indicatif présent
34,
35,
36,
37,
38,
39, # indicatif passé simple
17,
18,
19,
20,
21,
22, # indicatif imparfait
40,
41,
42,
43,
44,
45, # indicatif futur simple
46,
47,
48,
49,
50,
51, # conditionnel présent
52,
53,
54, # impératif présent
55,
56,
57,
58,
59,
60, # subjonctif présent
67,
68,
69,
70,
71,
72, # subjonctif imparfait
],
)
示例5: tenses
def tenses(self, verb, parse=True):
"""Returns a list of possible tenses for the given inflected verb."""
tenses = _Verbs.tenses(self, verb, parse)
if len(tenses) == 0:
# auswirkte => wirkte aus
for prefix in prefix_separable:
if verb.startswith(prefix):
tenses = _Verbs.tenses(
self, verb[len(prefix):] + " " + prefix, parse)
break
return tenses
示例6: __init__
def __init__(self):
_Verbs.__init__(self, os.path.join(MODULE, "nl-verbs.txt"),
language = "nl",
format = [0, 1, 2, 3, 7, 8, 17, 18, 19, 23, 25, 24, 16, 9, 10, 11, 15, 33, 26, 27, 28, 32],
default = {
1: 0, 2: 0, 3: 0, 7: 0, # present singular
4: 7, 5: 7, 6: 7, # present plural
17: 25, 18: 25, 19: 25, 23: 25, # past singular
20: 23, 21: 23, 22: 23, # past plural
9: 16, 10: 16, 11: 16, 15: 16, # present singular negated
12: 15, 13: 15, 14: 15, # present plural negated
26: 33, 27: 33, 28: 33, # past singular negated
29: 32, 30: 32, 31: 32, 32: 33 # past plural negated
})
示例7: __init__
def __init__(self):
_Verbs.__init__(self, os.path.join(MODULE, "it-verbs.txt"),
language = "it",
default = {},
format = [
0, 1, 2, 3, 4, 5, 6, 8, # indicativo presente
34, 35, 36, 37, 38, 39, 24, # indicativo passato remoto
17, 18, 19, 20, 21, 22, # indicativo imperfetto
40, 41, 42, 43, 44, 45, # indicativo futuro semplice
46, 47, 48, 49, 50, 51, # condizionale presente
52, 521,53, 54, 541, # imperativo
55, 56, 57, 58, 59, 60, # congiuntivo presente
67, 68, 69, 70, 71, 72 # congiontive imperfetto
])