def conjugate_future(type, pres1sg, tags={}): if type == CONJ_1: pres_stem = pres1sg[:-1] + u'ā' elif type == CONJ_2: pres_stem = pres1sg[:-2] + u'ē' elif type == CONJ_3A: pres_stem = pres1sg[:-1] + u'ē' elif type == CONJ_3B: pres_stem = pres1sg[:-2] + u'iē' elif type == CONJ_4: pres_stem = pres1sg[:-2] + u'iē' items = [] if type in [CONJ_1, CONJ_2]: items += conjugate(pres_stem, util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'active', 'tense':'future'}), [u'bō', u'bis', u'bit', u'bimus', u'bitis', u'bunt']) items += conjugate(pres_stem, util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'passive', 'tense':'future'}), [u'bor', (u'beris', u'bere'), u'bitur', u'bimur', u'biminī', u'buntur']) else: stem = pres_stem[:-1] items += conjugate(stem, util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'active', 'tense':'future'}), [u'am', u'ēs', u'et', u'ēmus', u'ētis', u'ent']) items += conjugate(stem, util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'passive', 'tense':'future'}), [u'ar', (u'ēris', u'ēre'), u'ētur', u'ēmur', u'ēminī', u'entur']) # util.pp(items) return items
def conjugate_imperfect(type, pres1sg, tags={}): if type == CONJ_1: stem = pres1sg[:-1] + u'ā' elif type == CONJ_2: stem = pres1sg[:-2] + u'ē' elif type == CONJ_3A: stem = pres1sg[:-1] + u'ē' elif type == CONJ_3B: stem = pres1sg[:-2] + u'iē' elif type == CONJ_4: stem = pres1sg[:-2] + u'iē' return conjugate(stem, util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'active', 'tense':'imperfect'}), [u'bam', u'bās', u'bat', u'bāmus', u'bātis', u'bant']) + \ conjugate(stem, util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'passive', 'tense':'imperfect'}), [u'bar', (u'bāris', u'bāre'), u'bātur', u'bāmur', u'bāminī', u'bantur'])
def conjugate_subjunctive_passive_perfect_(supinum, sum, tags={}): stem = supinum[:-2] items = [] for gender, suffix in {'m':u'us', 'f':u'a', 'n':u'um'}.items(): for person in [1,2,3]: surface = stem + suffix + u' ' + sum[person-1] info = {'surface':surface, 'gender':gender, 'person':person, 'number':'sg'} items.append( util.aggregate_dicts(info, tags) ) for gender, suffix in {'m':u'ī', 'f':u'ae', 'n':u'a'}.items(): for person in [1,2,3]: surface = stem + suffix + u' ' + sum[2+person] info = {'surface':surface, 'gender':gender, 'person':person, 'number':'pl'} items.append( util.aggregate_dicts(info, tags) ) # util.pp(items) return items
def conjugate_present(type, pres1sg, tags={}): items = [] if type == CONJ_1: stem = pres1sg[:-1] x = u'' long = y = u'ā' short = nt = u'a' elif type == CONJ_2: stem = pres1sg[:-2] x = u'e' long = y = u'ē' short = nt = u'e' elif type == CONJ_3A: stem = pres1sg[:-1] x = u'' y = u'e' long = short = u'i' nt = u'u' elif type == CONJ_3B: stem = pres1sg[:-2] x = u'i' y = u'e' long = short = u'i' nt = u'iu' elif type == CONJ_4: stem = pres1sg[:-2] x = u'i' long = y = u'ī' short = u'i' nt = u'iu' # x: -ō # long: A(ri) # short: a(tur), a(ntur) active_present_suffices = [x + u'ō', long + u's', short + u't', long + u'mus', long + u'tis', nt + u'nt'] passive_present_suffices = [x + u'or', (y + u'ris', y + u're'), long + u'tur', long + u'mur', long + u'minī', nt + u'ntur'] items += conjugate(stem, util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'active', 'tense':'present'}), active_present_suffices) items += conjugate(stem, util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'passive', 'tense':'present'}), passive_present_suffices) return items
def conjugate_gerundive(type, pres1sg, tags={}): if type in [CONJ_1, CONJ_3A]: stem = pres1sg[:-1] else: stem = pres1sg[:-2] return conjugate(stem + u'and', util.aggregate_dicts({'pos':'gerundive'}, tags), [u'us', u'a', u'um'], [{'gender':'m'}, {'gender':'f'}, {'gender':'n'}])
def conjugate_gerund(type, pres1sg, tags={}): if type in [CONJ_1, CONJ_3A]: stem = pres1sg[:-1] else: stem = pres1sg[:-2] return conjugate(stem + u'and', util.aggregate_dicts({'pos':'gerund'}, tags), [u'um', u'ī'], [{'case':'Acc'}, {'case':'Gen'}])
def ego(): items = [] # 一人称 common_tags = {'pos':'pronoun', 'person':1, 'gender':'m', 'ja':'私', 'desc':'人称代名詞'} # genderは仮 forms = [u'ego', u'mē', u'meī', u'mihi', u'mē', u'nōs', u'nōs', u'nostrī', u'nōbīs', u'nōbīs'] items += decline(u'', common_tags, forms, latin_noun.case_tags_5x2) items += [util.aggregate_dicts({'surface':u'mihī'}, common_tags, latin_noun.case_tags_5x2[3])] items += [util.aggregate_dicts({'surface':u'nostrum'}, common_tags, latin_noun.case_tags_5x2[7])] # 二人称 common_tags = {'pos':'pronoun', 'person':2, 'gender':'m', 'ja':'あなた', 'desc':'人称代名詞'} forms = [u'tū', u'tē', u'tuī', u'tibi', u'tē', u'vōs', u'vōs', u'vestrī', u'vōbīs', u'vōbīs'] items += decline(u'', common_tags, forms, latin_noun.case_tags_5x2) items += [util.aggregate_dicts({'surface':u'tibī'}, common_tags, latin_noun.case_tags_5x2[3])] items += [util.aggregate_dicts({'surface':u'vestrum'}, common_tags, latin_noun.case_tags_5x2[7])] return util.aggregate_cases(items)
def conjugate_subjunctive_passive_present(type, pres1sg, tags={}): stem = pres1sg[:-1] if type == CONJ_1: suffices = [u'er', (u'ēris', u'ēre'), u'ētur', u'ēmur', u'ēminī', u'entur'] else: suffices = [u'ar', (u'āris', u'āre'), u'ātur', u'āmur', u'āminī', u'antur'] return conjugate(stem, util.aggregate_dicts(tags, {'mood':'subjunctive', 'voice':'passive', 'tense':'present'}), suffices) return items
def conjugate_imperative(type, pres1sg, tags={}): items = [] if type == CONJ_1: stem = pres1sg[:-1] long = long0 = u'ā' short = u'a' elif type == CONJ_2: stem = pres1sg[:-2] long = long0 = u'ē' short = u'e' elif type == CONJ_3A: stem = pres1sg[:-1] long0 = u'e' long = u'i' short = u'u' elif type == CONJ_3B: stem = pres1sg[:-2] long0 = u'e' long = u'i' short = u'iu' elif type == CONJ_4: stem = pres1sg[:-2] long = long0 = u'ī' short = u'iu' items += conjugate(stem, util.aggregate_dicts(tags, {'voice':'active', 'tense':'present', 'mood':'imperative'}), [None, long0, None, None, long + u'te', None]) items += conjugate(stem, util.aggregate_dicts(tags, {'voice':'passive', 'tense':'present', 'mood':'imperative'}), [None, long0 + u're', None, None, long + u'minī', None]) items += conjugate(stem, util.aggregate_dicts(tags, {'voice':'active', 'tense':'future', 'mood':'imperative'}), [None, long + u'tō', long + u'tō', None, long + u'tōte', short + u'ntō']) items += conjugate(stem, util.aggregate_dicts(tags, {'voice':'passive', 'tense':'future', 'mood':'imperative'}), [None, long + u'tor', long + u'tor', None, None, short + u'ntor']) return items
def conjugate_subjunctive_active_present(type, pres1sg, tags={}): stem = pres1sg[:-1] if type == CONJ_1: suffices = [u'em', u'ēs', u'et', u'ēmus', u'ētis', u'ent'] else: suffices = [u'am', u'ās', u'at', u'āmus', u'ātis', u'ant'] items = [] items += conjugate(stem, util.aggregate_dicts(tags, {'mood':'subjunctive', 'voice':'active', 'tense':'present'}), suffices) return items
def conjugate_infinitive(type, inf, perf1sg, supinum, ja='', tags={}): if type in [CONJ_3A, CONJ_3B]: # regere -> regī # capere -> capī passive_inf = inf[:-3] + u'ī' else: # amAre -> amārī passive_inf = inf[:-1] + u'ī' common_tags = {'mood':'infinitive', 'ja':ja} pf_stem = perf1sg[:-1] pp_stem = supinum[:-2] items = [] items += conjugate('', util.aggregate_dicts(common_tags, {'voice':'active', 'tense':'present'}, tags), [inf], [{}]) items += conjugate(pf_stem, util.aggregate_dicts(common_tags, {'voice':'active', 'tense':'perfect'}, tags), [u'isse'], [{}]) items += conjugate(pp_stem, util.aggregate_dicts(common_tags, {'voice':'active', 'tense':'future'}, tags), [u'ūrus esse', u'ūra esse', u'ūrum esse'], [{'gender':'m'}, {'gender':'f'}, {'gender':'n'}]) items += conjugate('', util.aggregate_dicts(common_tags, {'voice':'passive', 'tense':'present'}, tags), [passive_inf], [{}]) items += conjugate(pp_stem, util.aggregate_dicts(common_tags, {'voice':'passive', 'tense':'perfect'}, tags), [u'us esse', u'a esse', u'um esse'], [{'gender':'m'}, {'gender':'f'}, {'gender':'n'}]) items += conjugate('', util.aggregate_dicts(common_tags, {'voice':'passive', 'tense':'future'}, tags), [supinum + u' īrī'], [{}]) return items
def conjugate_participle(pres_stem, supinum, tags={}): items = [] jas = tags.get('ja', '').split(',') javs = map(JaVerb, jas) def forms(flag): return ','.join([jav.form(flag) for jav in javs]) # 現在分詞 # prūdēns型; 〜しつつある nom_sg_m = pres_stem + u'ns' if pres_stem[-1] == u'ā': gen_sg = pres_stem[:-1] + u'antis' elif pres_stem == u'iē': gen_sg = u'euntis' else: # pres_stem[-1] = 'ē' gen_sg = pres_stem[:-1] + u'entis' items += latin_adj.decline_adj_type2(nom_sg_m, gen_sg, '-', util.aggregate_dicts(tags, {'pos':'participle', 'tense':'present', 'ja':forms(Verb.PARTICIPLE_PRESENT)})) # 未来分詞 if supinum == 'es##': nom_sg_m = supinum[:-2] + u'urus' else: nom_sg_m = supinum[:-2] + u'ūrus' nom_sg_f = nom_sg_m[:-2] + u'a' items += latin_adj.decline_adj_type1(nom_sg_m, nom_sg_f, util.aggregate_dicts(tags, {'pos':'participle', 'tense':'future', 'ja':forms(Verb.PARTICIPLE_FUTURE)})) # 完了分詞 nom_sg_m = supinum[:-2] + u'us' nom_sg_f = nom_sg_m[:-2] + u'a' items += latin_adj.decline_adj_type1(nom_sg_m, nom_sg_f, util.aggregate_dicts(tags, {'pos':'participle', 'tense':'past', 'ja':forms(Verb.PARTICIPLE_PERFECT)})) return util.aggregate_cases(items)
def decline_adj_type1(nom_sg_m, nom_sg_f, tags, comp=True): ja = tags['ja'] suffix = nom_sg_m[-2:] if suffix == u'us': stem1 = nom_sg_m[:-2] stem2 = stem1 # + u'ī' elif suffix in [u'er', u'ur']: # ur for "satur" if nom_sg_m[-3:] == nom_sg_f[-4:-1]: # lī-ber lī-ber-a stem1 = nom_sg_m stem2 = stem1 else: stem1 = nom_sg_m stem2 = nom_sg_m[:-2] + u'r' # else: # print "decline_adj_type1(%s, %s, %s, %s)" % (str(nom_sg_m), str(nom_sg_f), str(tags), str(comp)) # return [] my_tags = util.aggregate_dicts({'pos':'adj', 'base':nom_sg_m, 'type':'I'}, tags) table = [] my_tags['gender'] = 'm' table += latin_noun.decline_noun_type2(nom_sg_m, stem2 + u'ī', 'm', ja, my_tags) if nom_sg_m == 'meus': table[1]['surface'] = u'mī' # Voc my_tags['gender'] = 'f' table += latin_noun.decline_noun_type1(nom_sg_f, stem2 + u'ae', 'f', ja, my_tags) my_tags['gender'] = 'n' table += latin_noun.decline_noun_type2(stem2 + u'um', stem2 + u'ī', 'n', ja, my_tags) if comp: # 比較級 tags_c = {'pos':'adj', 'base':nom_sg_m, 'ja':'より'+my_tags['ja'], 'type':'I', 'rank':'+'} table += decline_adj_comparative(stem2 + u'ior', tags_c) # 最上級 tags_s = {'pos':'adj', 'base':nom_sg_m, 'ja':'最も'+my_tags['ja'], 'type':'I', 'rank':'++'} if nom_sg_m[-1] == 'r': base = nom_sg_m + u'rimus' else: base = stem2 + u'issimus' table += decline_adj_superlative(base, tags_s) return table
def load_def(file, tags={}): items = [] with open(file, 'r') as fp: for line in fp: if len(line) == 0: continue if line[0] == '#': continue fs = line.rstrip().split('\t') if len(fs) < 3: continue surface = fs[0].decode('utf-8') pos = fs[1] ja = fs[2] items.append(util.aggregate_dicts({'surface':surface, 'pos':pos, 'ja':ja}, tags)) return items
def conjugate_subjunctive_passive_past_perfect(supinum, tags={}): return conjugate_subjunctive_passive_perfect_(supinum, [u'essem', u'essēs', u'esset', u'essēmus', u'essētis', u'essent'], util.aggregate_dicts(tags, {'mood':'subjunctive', 'voice':'passive', 'tense':'past-perfect'}))
def conjugate_subjunctive_passive_perfect(supinum, tags={}): return conjugate_subjunctive_passive_perfect_(supinum, [u'sim', u'sīs', u'sit', u'sīmus', u'sītis', u'sint'], util.aggregate_dicts(tags, {'mood':'subjunctive', 'voice':'passive', 'tense':'perfect'}))
def decline_adj_type2(nom_sg_mf, gen_sg, nom_sg_n, tags): my_tags = util.aggregate_dicts({'pos':'adj', 'base':nom_sg_mf, 'type':'II'}, tags) table = [] if nom_sg_n == u'-': if nom_sg_mf[-1:] == 'x': pass elif nom_sg_mf[-2:] == 'ns': pass # (2: n=m) -x -cis, -ns -ntis stem1 = nom_sg_mf stem2 = gen_sg[:-2] if nom_sg_mf in [u'vetus', u'dīves']: suffices = [u'', u'', u'em', u'is', u'ī', u'e', u'ēs', u'ēs', u'ēs', u'um', u'ibus', u'ibus'] else: suffices = [u'', u'', u'em', u'is', u'ī', u'ī', # (-e) for Abl.sg u'ēs', u'ēs', u'ēs', u'ium', u'ibus', u'ibus'] # (īs) for Acc.pl # tags = dict({'pos':'adj', 'base':nom_sg_mf, 'type':'II'}, **tags) my_tags['gender'] = 'm' table += latin_noun.declension_table(stem1, stem2, suffices, my_tags) my_tags['gender'] = 'f' table += latin_noun.declension_table(stem1, stem2, suffices, my_tags) if nom_sg_mf == u'vetus': suffices = [u'', u'', u'', u'is', u'ī', u'e', u'a', u'a', u'a', u'um', u'ibus', u'ibus'] elif nom_sg_mf == u'dīves': suffices = [u'', u'', u'', u'is', u'ī', u'e', u'ia', u'ia', u'ia', u'um', u'ibus', u'ibus'] # Nom/Voc/Acc.pl で dīt- else: suffices = [u'', u'', u'', u'is', u'ī', u'ī', # (-e) for Abl.sg u'ia', u'ia', u'ia', u'ium', u'ibus', u'ibus'] my_tags['gender'] = 'n' table += latin_noun.declension_table(stem1, stem2, suffices, my_tags) else: # (1: n!=m) -is/-e if nom_sg_mf[-2:] == 'er': stem1 = nom_sg_mf stem2 = gen_sg[:-2] suffices = [u'', u'', u'em', u'is', u'ī', u'ī', u'ēs', u'ēs', u'ēs', u'ium', u'ibus', u'ibus'] # (īs) for Acc.pl else: stem1 = nom_sg_mf[:-2] stem2 = gen_sg[:-2] suffices = [u'is', u'is', u'em', u'is', u'ī', u'ī', u'ēs', u'ēs', u'ēs', u'ium', u'ibus', u'ibus'] # (īs) for Acc.pl my_tags['gender'] = 'm' table += latin_noun.declension_table(stem1, stem2, suffices, my_tags) # f stem1 = stem2 = gen_sg[:-2] suffices = [u'is', u'is', u'em', u'is', u'ī', u'ī', u'ēs', u'ēs', u'ēs', u'ium', u'ibus', u'ibus'] # (īs) for Acc.pl my_tags['gender'] = 'f' table += latin_noun.declension_table(stem1, stem2, suffices, my_tags) # n suffices = [u'e', u'e', u'e', u'is', u'ī', u'ī', u'ia', u'ia', u'ia', u'ium', u'ibus', u'ibus'] # (īs) for Acc.pl my_tags['gender'] = 'n' stem1 = stem2 table += latin_noun.declension_table(stem1, stem2, suffices, my_tags) # 比較級 tags_c = {'pos':'adj', 'base':nom_sg_mf, 'ja':'より'+my_tags['ja'], 'type':'II', 'rank':'+'} table += decline_adj_comparative(gen_sg[:-2] + u'ior', tags_c) # 最上級 tags_s = {'pos':'adj', 'base':nom_sg_mf, 'ja':'最も'+my_tags['ja'], 'type':'II', 'rank':'++'} if nom_sg_mf[-4:] == 'ilis': base = nom_sg_mf[:-4] + 'illimus' else: base = gen_sg[:-2] + u'issimus' table += decline_adj_superlative(base, tags_s) return table
def conjugate_future_perfect(perf1sg, tags={}): stem = perf1sg[:-1] return conjugate(stem, util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'active', 'tense':'future-perfect'}), [u'erō', u'eris', u'erit', u'erimus', u'eritis', u'erint'])
def conjugate_subjunctive_passive_imperfect(inf, tags={}): return conjugate(inf[:-1], util.aggregate_dicts(tags, {'mood':'subjunctive', 'voice':'passive', 'tense':'imperfect'}), [u'er', (u'ēris', u'ēre'), u'ētur', u'ēmur', u'ēminī', u'entur'])
def conjugate_subjunctive_active_imperfect(inf, tags={}): return conjugate(inf[:-1], util.aggregate_dicts(tags, {'mood':'subjunctive', 'voice':'active', 'tense':'imperfect'}), [u'em', u'ēs', u'et', u'ēmus', u'ētis', u'ent'])
def conjugate_perfect(perf1sg, tags={}): stem = perf1sg[:-1] return conjugate(stem, util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'active', 'tense':'perfect'}), [u'ī', u'istī', u'it', u'imus', u'istis', (u'ērunt', u'ēre')])
def conjugate_verb_eo(prefix=u'', ja=''): tags = {'pos':'verb', 'pres1sg':prefix+u'eō', 'ja':ja} inf = prefix + u'īre' perf1sg = prefix + u'iī' # pres_stem = u'' # pf_stem = u'' # īvī iī # itum items = [] items += conjugate(prefix + u'', util.aggregate_dicts(tags, {'voice':'active', 'mood':'infinitive', 'tense':'present'}), [inf], [{}]) items += conjugate(prefix + u'', util.aggregate_dicts(tags, {'voice':'active', 'mood':'infinitive', 'tense':'perfect'}), [(u'īsse', u'īvisse')], [{}]) items += conjugate(prefix + u'', util.aggregate_dicts(tags, {'voice':'active', 'mood':'infinitive', 'tense':'future'}), [u'itūrus esse'], [{}]) # 能動態 現在・過去・未来 items += conjugate(prefix, util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'active', 'tense':'present'}), [u'eō', u'īs', u'it', u'īmus', u'ītis', u'eunt']) items += conjugate(prefix, util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'active', 'tense':'imperfect'}), [u'ībam', u'ībās', u'ībat', u'ībāmus', u'ībātis', u'ībant']) items += conjugate(prefix, util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'active', 'tense':'future'}), [u'ībō', u'ībis', u'ībit', u'ībimus', u'ībitis', u'ībunt']) # 能動態 完了 items += conjugate_perfect(perf1sg, tags) items += conjugate_past_perfect(perf1sg, tags) items += conjugate_future_perfect(perf1sg, tags) # 接続法 items += conjugate(prefix, util.aggregate_dicts(tags, {'mood':'subjunctive', 'voice':'active', 'tense':'present'}), [u'eam', u'eāe', u'eas', u'eāmus', u'eātis', u'eant']) items += conjugate(prefix, util.aggregate_dicts(tags, {'mood':'subjunctive', 'voice':'active', 'tense':'imperfect'}), [u'īrem', u'īrēs', u'īret', u'īrēmus', u'īrētis', u'īrent']) items += conjugate(prefix, util.aggregate_dicts(tags, {'mood':'subjunctive', 'voice':'active', 'tense':'perfect'}), [u'ierim', u'ieris', u'ierit', u'ierimus', u'ieritis', u'ierint']) items += conjugate(prefix, util.aggregate_dicts(tags, {'mood':'subjunctive', 'voice':'active', 'tense':'past-perfect'}), [u'īssem', u'īssēs', u'īsset', u'īssēmus', u'īssētis', u'īssent']) # 命令形 items += conjugate(prefix, util.aggregate_dicts(tags, {'voice':'active', 'tense':'present', 'mood':'imperative'}), [None, u'ī', None, None, u'īte', None]) items += conjugate(prefix, util.aggregate_dicts(tags, {'voice':'active', 'tense':'future', 'mood':'imperative'}), [None, u'ītō', u'ītō', None, u'ītōte', u'euntō']) # 分詞 items += conjugate_participle(u'iē', u'itum', tags) # print "(eo)", util.render(items) return items
def conjugate_passive_future_perfect(supinum, tags={}): return conjugate_passive_perfect_(supinum, [u'erō', u'eris', u'erit', u'erimus', u'eritis', u'erunt'], util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'passive', 'tense':'future-perfect'}))
def conjugate_passive_past_perfect(supinum, tags={}): return conjugate_passive_perfect_(supinum, [u'eram', u'erās', u'erat', u'erāmus', u'erātis', u'erant'], util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'passive', 'tense':'past-perfect'}))
def conjugate_passive_perfect(supinum, tags={}): return conjugate_passive_perfect_(supinum, [u'sum', u'es', u'est', u'sumus', u'estis', u'sunt'], util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'passive', 'tense':'perfect'}))
def decline(common_prefix, common_tags, suffices, suffices_tags, extra_tags={}): return util.variate(common_prefix, util.aggregate_dicts(common_tags, extra_tags), suffices, suffices_tags)
def conjugate_subjunctive_active_perfect(perf1sg, tags={}): return conjugate(perf1sg[:-1], util.aggregate_dicts(tags, {'mood':'subjunctive', 'voice':'active', 'tense':'perfect'}), [u'erim', u'eris', u'erit', u'erimus', u'eritis', u'erint'])
def conjugate_subjunctive_active_past_perfect(perf1sg, tags={}): return conjugate(perf1sg[:-1], util.aggregate_dicts(tags, {'mood':'subjunctive', 'voice':'active', 'tense':'past-perfect'}), [u'issem', u'issēs', u'isset', u'issēmus', u'issētis', u'issent'])
def conjugate_verb_fero(prefix=u'', ja=''): tags = {'pos':'verb', 'pres1sg':prefix+u'ferō', 'ja':ja} inf = prefix + u'ferre' pres_stem = prefix + u'fer' perf1sg = prefix + u'tulī' pf_stem = perf1sg[:-1] #tul supinum = prefix + u'lātum' items = [] items += conjugate(prefix, util.aggregate_dicts(tags, {'voice':'active', 'mood':'infinitive', 'tense':'present'}), [u'ferre'], [{}]) items += conjugate(prefix, util.aggregate_dicts(tags, {'voice':'active', 'mood':'infinitive', 'tense':'perfect'}), [u'tulisse'], [{}]) items += conjugate(prefix, util.aggregate_dicts(tags, {'voice':'active', 'mood':'infinitive', 'tense':'future'}), [u'lātūrus esse'], [{}]) # 能動態 現在・過去・未来 items += conjugate(prefix, util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'active', 'tense':'present'}), [u'ferō', u'fers', u'fert', u'ferimus', u'fertis', u'ferunt']) items += conjugate(prefix, util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'active', 'tense':'imperfect'}), [u'ferēbam', u'ferēbās', u'ferēbat', u'ferēbāmus', u'ferēbātis', u'ferēbant']) items += conjugate(prefix, util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'active', 'tense':'future'}), [u'feram', u'ferēs', u'feret', u'ferēmus', u'ferētis', u'ferent']) # 能動態 完了 items += conjugate_perfect(perf1sg, tags) items += conjugate_past_perfect(perf1sg, tags) items += conjugate_future_perfect(perf1sg, tags) # 受動態 現在・過去・未来 items += conjugate(prefix, util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'passive', 'tense':'present'}), [u'feror', u'ferris', u'fertur', u'ferimur', u'feriminī', u'feruntur']) items += conjugate(prefix, util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'passive', 'tense':'imperfect'}), [u'ferēbar', u'ferēbāris', u'ferēbātur', u'ferēbāmur', u'ferēbāminī', u'ferēbantur']) items += conjugate(prefix, util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'passive', 'tense':'future'}), [u'ferar', u'ferēris', u'ferētur', u'ferēmur', u'ferēminī', u'ferentur']) # 命令形 items += conjugate(prefix, util.aggregate_dicts(tags, {'voice':'active', 'tense':'present', 'mood':'imperative'}), [None, u'fer', None, None, u'ferte', None]) items += conjugate(prefix, util.aggregate_dicts(tags, {'voice':'active', 'tense':'future', 'mood':'imperative'}), [None, u'fertō', u'fertō', None, u'fertōte', u'feruntō']) items += conjugate(prefix, util.aggregate_dicts(tags, {'voice':'passive', 'tense':'present', 'mood':'imperative'}), [None, u'ferre', None, None, u'feriminī', None]) items += conjugate(prefix, util.aggregate_dicts(tags, {'voice':'passive', 'tense':'future', 'mood':'imperative'}), [None, u'fertor', u'fertor', None, None, u'feruntor']) # 分詞 items += conjugate_participle(pres_stem, supinum, tags) # print "(fero)", util.render(items) return items
def conjugate_past_perfect(perf1sg, tags={}): stem = perf1sg[:-1] return conjugate(stem, util.aggregate_dicts(tags, {'mood':'indicative', 'voice':'active', 'tense':'past-perfect'}), [u'eram', u'erās', u'erat', u'erāmus', u'erātis', u'erant'])