Help:Language inflection bot
Making a Wiktionary Python inflection bot isn't so difficult. Here are the steps...
- Know the language you're dealing with pretty well (especially the conjugations/inflection/declension) in order to avoid complications in the future and irate fellow editors. Verbs can be irregular, defective, impersonal or may have otherwise incomplete conjugations. Bots work best for regular patterns.
- Visit this Mediawiki page, follow it step by step. This page will guide you how to install Python and set it up for the Wikimedia framework.
- Download and unzip the Python nightly file (pywikipedia-nightly). Subversion (SVN) is a good tool for batch downloads and it's free.
- run generate_user_files.py, which will create
- edit user-config.py per instructions
- run login.py
- Add a Python file like User:FitBot/forms to the Python folder. Add a corresponding text file (.txt), which it can read (remember to save the text file with UTF-8 encoding. The .txt file must be the same one that is mentioned in the aforementioned Python file.
- Make offline templates in a word-processing document (Microsoft Word, OpenOffice Writer, or TextEdit works well for this), which can be easily and quickly changed, depending on the stem. Remember to turn off any Autocorrect functions, especially for format, punctuation and spacing, or you get extra spaces and/or formating problems. Keeping the spellcheck on may or may not be a good idea, in case of mistyping something.
- Ask others to check the test edits and request feedback from other knowledgeable users. If you try implementing new things into the code, then get other people to check for mistakes alongside you.
- Create an account for your bot. On the bot's userpage, place a description of what the bot is intended to do.
- Start up a bot vote at WT:VOTE.
- Create entries.
- Check entries; check entries; check entries. Users are expected to clean up after their bot when there are problems. Especially, check the spelling of the root word - if you get it wrong then the bot will generate a load of wrongly-spelled entries that only a sysop can delete.
A useful tool for tracking is the "whatlinkshere" function for template pages, which gives an automated chronological list of all pages in that category, e.g. for eo-conj (for Esperanto pages with conjugations)
Some bot accounts for inflected forms
- User:NadandoBot - Spanish
- User:FitBot - Latin, Galician
- User:MewBot - Catalan, Dutch, Esperanto
- User:OpiBot - Lithuanian, Romanian, Slovene, Esperanto - Albanian forthcoming - possibly Hungarian, Armenian, Turkish
- User:SemperBlottoBot - Italian, French, Latin, German, Portuguese
- User:SurjectionBot - Finnish