User:Codeofdusk/voseo

From Wiktionary, the free dictionary
Jump to navigation Jump to search

My Voseo work[edit]

I wrote a script which scans Wiktionary's Spanish verb forms, adding voseo forms when they are missing. It has eliminated a large percentage of missing forms from the dictionary.

Obtaining the script[edit]

I have released the script as a Github repo. This repo can be viewed on the Github website, downloaded, or cloned using a standard git client. If you have suggestions on how to improve the script, make your changes, fork the repo and make a pull request!

Using the script[edit]

configuration[edit]

The script uses Pywikibot in a Python3 environment. If you do not have Pywikibot, set it up first. Put the script in your pywikibot directory. There are configuration variables at the top of the script. The defaults are usually fine, but they may need to be edited for some cases. In particular, by default the script will stop editing if your English Wiktionary account's talk page is edited, in case someone is reviewing the script's work and finds a mistake. If you have made modifications to the script and wish to test them on a limited scale, it may be desirable to add editing delays (in addition to those offered by Pywikibot) or an edit cap, so that the script does not make large numbers of edits that would be difficult to clean up by hand.

basic usage[edit]

From a shell, run : /path/to/python3 pwb.py voseo The script will start an automated scan of Spanish verb categories, cleaning up any mistakes it finds.

advanced usage[edit]

The script can be imported into others, or certain parts can be run by hand. For example, there is a useful CSV generator which creates tables of vos forms, which can be converted into Wikitables with this tool and posted to Wiktionary discussions. To start an interactive Pywikibot shell, run : /path/to/python3 pwb.py shell From the Python prompt, run : import voseo From here, you can run the following for documentation on available functions : help(voseo)