def add_dict_entry_internal(self, formatted_head_word, forms, formatted_desc):
self.n_expanded_entries += 1
self.index_size += len(forms)
if self.entries_in_curr_dict_html >= self.max_entries_per_dict_html:
self.close_dict_html()
self.start_dict_html()
self.entries_in_curr_dict_html += 1
self.curr_dict_f.write("""
<idx:entry scriptable="yes" spell="yes">
<idx:short>
<idx:orth value=%s>%s
""" % (quoteattr(forms[0]), formatted_head_word))
if len(forms[1:]) > 0:
self.curr_dict_f.write("""
<idx:infl>
""")
for infl in forms[1:]:
self.curr_dict_f.write("""<idx:iform value=%s exact="yes"/>\n""" % quoteattr(infl))
self.curr_dict_f.write("""
</idx:infl>
""")
self.curr_dict_f.write("""
</idx:orth>
%s
</idx:short>
</idx:entry>
""" % formatted_desc)
评论列表
文章目录