def decline_adj_comparative(nom_sg_mf, tags): table = [] stem1 = nom_sg_mf stem1_n = nom_sg_mf[:-3] + 'ius' stem2 = nom_sg_mf[:-3]+ u'iōr' suffices = [u'', u'', u'em', u'is', u'ī', u'e', # (-ī) for Abl.sg u'ēs', u'ēs', u'ēs', u'um', u'ibus', u'ibus'] # (īs) for Acc.pl tags['gender'] = 'm' table += latin_noun.declension_table(stem1, stem2, suffices, tags) tags['gender'] = 'f' table += latin_noun.declension_table(stem1, stem2, suffices, tags) suffices = [u'', u'', u'', u'is', u'ī', u'e', # (-ī) for Abl.sg u'a', u'a', u'a', u'um', u'ibus', u'ibus'] # (īs) for Acc.pl tags['gender'] = 'n' table += latin_noun.declension_table(stem1_n, stem2, suffices, tags) return table
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