#!/usr/bin/env python
#coding: utf-8
# Copyright CodeCat 2010, 2011
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Lesser General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
# This script is based on parts from
# http://en.wiktionary.orghttps://dictious.com/en/User:SemperBlottoBot/verbs
import wikipedia, re
from formbot import *
class EOVerbFormBot(GenericFormBot):
"""A form bot for Esperanto verb forms."""
def __init__(self, head, cleanupCat, simulation = False, force = False, verbose = False):
GenericFormBot.__init__(
self, head, , 'eo', 'Esperanto',
cleanupCat, simulation, force, verbose)
def generateEntries(self, template, params):
"""Overrides base class method."""
if template == 'eo-conj':
return self.conjugate(params)
else:
return None
def conjugate(self, params):
"""Conjugate an Esperanto verb using {{eo-conj}}."""
stem = params
forms = {}
forms = '===Verb===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|as}}'
forms = '===Verb===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|is}}'
forms = '===Verb===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|os}}'
forms = '===Verb===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|u}}'
forms = '===Verb===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|us}}'
forms = '===Adjective===\n{{eo-part-sublemma|' + stem + '|anta}}\n\n# {{eo-form of|' + stem + '|anta}}'
forms = '===Adjective===\n{{eo-part-sublemma|' + stem + '|inta}}\n\n# {{eo-form of|' + stem + '|inta}}'
forms = '===Adjective===\n{{eo-part-sublemma|' + stem + '|onta}}\n\n# {{eo-form of|' + stem + '|onta}}'
forms = '===Adjective===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|antan}}'
forms = '===Adjective===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|antaj}}'
forms = '===Adjective===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|antajn}}'
forms = '===Adjective===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|intan}}'
forms = '===Adjective===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|intaj}}'
forms = '===Adjective===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|intajn}}'
forms = '===Adjective===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|ontan}}'
forms = '===Adjective===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|ontaj}}'
forms = '===Adjective===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|ontajn}}'
forms = '===Noun===\n{{eo-part-sublemma|' + stem + '|anto}}\n\n# {{eo-form of|' + stem + '|anto}}'
forms = '===Noun===\n{{eo-part-sublemma|' + stem + '|into}}\n\n# {{eo-form of|' + stem + '|into}}'
forms = '===Noun===\n{{eo-part-sublemma|' + stem + '|onto}}\n\n# {{eo-form of|' + stem + '|onto}}'
forms = '===Noun===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|anton}}'
forms = '===Noun===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|antoj}}'
forms = '===Noun===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|antojn}}'
forms = '===Noun===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|inton}}'
forms = '===Noun===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|intoj}}'
forms = '===Noun===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|intojn}}'
forms = '===Noun===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|onton}}'
forms = '===Noun===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|ontoj}}'
forms = '===Noun===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|ontojn}}'
forms = '===Adverb===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|ante}}'
forms = '===Adverb===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|inte}}'
forms = '===Adverb===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|onte}}'
if not 'intr' in params:
forms = '===Adjective===\n{{eo-part-sublemma|' + stem + '|ata}}\n\n# {{eo-form of|' + stem + '|ata}}'
forms = '===Adjective===\n{{eo-part-sublemma|' + stem + '|ita}}\n\n# {{eo-form of|' + stem + '|ita}}'
forms = '===Adjective===\n{{eo-part-sublemma|' + stem + '|ota}}\n\n# {{eo-form of|' + stem + '|ota}}'
forms = '===Adjective===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|atan}}'
forms = '===Adjective===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|ataj}}'
forms = '===Adjective===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|atajn}}'
forms = '===Adjective===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|itan}}'
forms = '===Adjective===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|itaj}}'
forms = '===Adjective===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|itajn}}'
forms = '===Adjective===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|otan}}'
forms = '===Adjective===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|otaj}}'
forms = '===Adjective===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|otajn}}'
forms = '===Noun===\n{{eo-part-sublemma|' + stem + '|ato}}\n\n# {{eo-form of|' + stem + '|ato}}'
forms = '===Noun===\n{{eo-part-sublemma|' + stem + '|ito}}\n\n# {{eo-form of|' + stem + '|ito}}'
forms = '===Noun===\n{{eo-part-sublemma|' + stem + '|oto}}\n\n# {{eo-form of|' + stem + '|oto}}'
forms = '===Noun===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|aton}}'
forms = '===Noun===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|atoj}}'
forms = '===Noun===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|atojn}}'
forms = '===Noun===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|iton}}'
forms = '===Noun===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|itoj}}'
forms = '===Noun===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|itojn}}'
forms = '===Noun===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|oton}}'
forms = '===Noun===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|otoj}}'
forms = '===Noun===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|otojn}}'
forms = '===Adverb===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|ate}}'
forms = '===Adverb===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|ite}}'
forms = '===Adverb===\n{{head|eo}}\n\n# {{eo-form of|' + stem + '|ote}}'
return forms