User:QuasiBot
QuasiBot | |
---|---|
(talk · contribs) | |
Operator: | AugPi (t/c) |
Approved? | Yes |
Flagged? | Yes |
Task/s: | Inflect Latin verbs |
Source code: | Templates (see Special:PrefixIndex/User:QuasiBot/la Basically I just subst and/or preload templates. |
Edit rate: | ◆ Max: 30 edits per minute when editing with Pywikipediabot (and Python or Bash). ◆ Max: 6 edits per minute when pasting subst templates manually. ◆ (obsolete) Max: 8 edits per minute when "running" down a DISTRIB page. |
Edit period/s: | When AugPi is online. |
Automatic or manual? | Manual login, new pages: automatic, existing pages: semi-automatic and/or manual. |
QuasiBot's objective: To populate the conjugation tables of Latin verbs.
Mode of operation
New page creation: automatic (Python).
Glossing: becoming automatic (Bash).
Otherwise manual (but not entirely: substing templates) and this can be done by AugPi.
Manual login. Does not run continuously, autonomously, like the AutoFormat (used to do) or (now) KassadBot, but is actuated by AugPi for each batch of edits.
Uses the following: (lower level) MediaWiki Templates in en.wikt, (middle level) Pywikibot (w/ Python, of course), (higher level) Python or Bash, depending on the task.
What it used to use: Lupin autoedit, /DISTRIB page, /GLOSS page. Mostly obsolete now: exeunt.
Edits per minute: 30 per minute maximum with Pywikibot, otherwise around 5 edits per minute (or less) when substing templates manually.
Overall procedure
- AugPi: check conjugation table (no actual editing here unless an error is found) (User:AugPi/Latin)
- AugPi: set up (go to /0)
- QuasiBot: go! (#Python procedure)
For double verbs
(for e.g. adlego)
/0/lemma for the first verb is 'adlego' and (later) for the second verb is 'adlego(2)'.
Let User:QuasiBot/adlego(2)/lemma = 'adlego'
and
User:QuasiBot/adlego(2)/mac = 'adlegō'.
Python procedure
(paradigm ft. suscito)
# In Terminal: use ls, cd, pwd to move to ../mybot/pywikipedia directory.
python login.py
# (Log in.)
cd ..
python
from conjdata import *
lemmaX = 'suscito'
stem11 = 'suscit'
stem22 = 'suscitav'
stem33 = 'suscitat'
pagelist0 = pagelist_1st_p0
pagelist1 = pagelist_1st_p1
pagelist2 = pagelist_1st_p2
uploadAll(pagelist0, pagelist1, pagelist2, lemmaX, stem11, stem22, stem33)
# uploadAll returns a list of entry titles which it has skipped (due to their pre-existence).
# For these, manually type or paste: {{subst:User:QuasiBot|suscito|new=0}}.
# Caveat: p=1 for Participle (lemmata).
# For participle forms: manually type or paste: {{subst:User:QuasiBot/part|suscito|new=0}}.
# Caveat: la=0 if there is a Latin>Verb section already.
For double verbs
(paradigm feat. edo and edo(2))
# In Xterm: use ls, cd, pwd to move to ../mybot/pywikipedia directory.
python login.py
# (Log in.)
cd ..
python
from conjdata import *
lemmaXa = 'edo'
lemmaXb = 'edo(2)'
stem11a = 'ed'
stem22a = 'ed'
stem33a = 'es'
stem11b = 'ed'
stem22b = 'edid'
stem33b = 'edit'
pagelist0a = pagelist_3rd_p0
pagelist1a = pagelist_3rd_p1
pagelist2a = pagelist_3rd_p2
pagelist0b = pagelist_3rd_p0
pagelist1b = pagelist_3rd_p1
pagelist2b = pagelist_3rd_p2
uploadAllDouble(pagelist0a, pagelist1a, pagelist2a, lemmaXa, stem11a, stem22a, stem33a, pagelist0b, pagelist1b, pagelist2b, lemmaXb, stem11b, stem22b, stem33b)
# uploadAllDouble returns a list of entry titles which it has skipped (due to their pre-existence).
# For these, manually type or paste: {{subst:User:QuasiBot/double|edo|edo(2)|new=0}}.
# Caveat: p=1 for Participle (lemmata), and then manual clean up is required (which definitely should be done by AugPi, not QuasiBot).
# For participle forms: manually type or paste: {{subst:User:QuasiBot/part|edo|new=0}} or {{subst:User:QuasiBot/part|edo(2)|new=0}} depending on which verb it belongs to.
# Caveat: la=0 if there is a Latin>Verb section already.
Esperanto verbs
(feat. ĉarmi)
python login.py
# (log in)
cd ..
python
from eoconjdata import *
list = list_active_and_passive
stem = u'\u0109arm'
upload(list, stem)
Interlingua verbs
(feat. scriber)
python login.py
# (log in)
cd ..
python
from iaconjdata import *
upload(list_er, 'scrib')
Bash procedures
Adding glosses
(for colligo(2))
bash gloss_all_1st "colligo(2)" colligo colligō collig colligav
(for quaero)
bash gloss_all_3rd quaero quaero quaerō quaer quaesiv
Adding count page (if missing)
(paradigm feat. Esperanto verb provi)
sed 's/*/prov/g' eo_conj_template > provi.txt
# more provi.txt # (preview)
bash count_page_verb provi.txt
Changing Esperanto verbal participles to adjectival participles
(ft. feki)
bash eopartverb fek
Python code (so far): file conjdata.py
Bash code
Templates
Python & Emacs cribsheets
Pywikibot help, reference
History
Brand new account, so currently I will just be importing (and adapting) all the necessary templates from user AugPi (talk • contribs). — This unsigned comment was added by QuasiBot (talk • contribs) at 2010-07-09T18:46:19.
Well, that seems to be mostly done, so now QuasiBot is in testing phase. QuasiBot 15:11, 10 July 2010 (UTC)
So far, so good... Two more tenses to test and then the testing phase will be over. QuasiBot 18:32, 16 July 2010 (UTC)
Testing phase is over. Tests done:
servo (1st conjugation)
deleo (2nd conjugation)
verto (3rd conjugation)
condio (4th conjugation)
cupio (3rd-IO conjugation)
sedeo (2nd-nopass conjugation)
placeo (2nd-nopass conjugation)
loquor (3rd-depon conjugation)
disco (3rd-nopass conjugation)
Result: bot works as intended, pretty much. QuasiBot 02:11, 21 July 2010 (UTC)
This bot has been approved (surprise!), so I'm moving in and "setting up shop." There have been new developments since the last time I was here, so templates all need to be rethought, reconfigured. —QuasiBot (t) 16:10, 10 August 2010 (UTC)
AutoFormat hasn't yet responded to my latest round of fugio edits. 'Tis strange. —QuasiBot (t) 04:49, 11 August 2010 (UTC)
MewBot includes {{count page}}
templates automatically: see, e.g., the code and history of injecteerden. Perhaps that is what is expected of bots. —QuasiBot (t) 06:09, 11 August 2010 (UTC)
- Yes, RU has confirmed the above supposition... On another note: I've been "running" down DISTRIB pages again (as I had originally proposed (on this page when I requested bot status on Beer Parlour)). —QuasiBot (t) 22:11, 12 August 2010 (UTC)
The Lupin autoedit's autoSave feature is working in Opera (though not in Firefox), so I can run down a DISTRIB page using Opera (...Safari has been mysteriously crashing lately, not always but in a non-deterministic fashion (often enough to be bothersome), when opening or previewing edit windows of Wiktionary articles (though it didn't happen the last time I run down a DISTRIB page using it...)). AugPi 19:04, 13 August 2010 (UTC)
The reconfiguring phase is, for the most part, over. Now it is just a matter of converting templates to (and updating templates of) different conjugations (probably not all at once, but as they become necessary (for conjugating given verbs)). AugPi 03:47, 18 August 2010 (UTC)
The core templates are all set up (there are 20 of them) and there is a procedure for generating nopass templates from existing templates, so I have set up a public feed-me page for these garden-variety conjugations... AugPi 14:48, 20 August 2010 (UTC)
All glossing is now done through a combination of Bash and Pywikibot: no more clicking on the /GLOSS page. AugPi 01:50, 29 November 2010 (UTC)
Likewise, new entry creation is now mostly done through Python and Pywikibot: no more clicking on the /DISTRIB page. AugPi 02:06, 29 November 2010 (UTC)
Tested conjugating the Esperanto verb malakcepti. AugPi 10:46, 8 December 2010 (UTC)
Also tested conjugating the Esperanto verb provi. AugPi 22:17, 9 December 2010 (UTC)
Procedure/paradigm (outdated, though it still works)
QuasiBot's subpages
QuasiBot's major templates
Core templates/conjugations
- /la-conj-1st+gloss ✔ (w/ latinv) (w/ optional parameter 2 (for verb-mac) ✔) (simplified) (la-verb)
- /la-conj-1st/part ✔ (w/ latinp) (la-verb)
- /la-conj-2nd+gloss ✴ (history: User:QuasiBot/la-conj-2nd ⇒ ✴) (w/ latinv) (w/ optional parameter 2 (for verb-mac) ✔) (simplified) (la-verb)
- /la-conj-2nd/part ✔ (w/ latinp) (la-verb)
- /la-conj-3rd+gloss ✔ (w/ latinv) (w/ optional parameter 2 (for verb-mac) ✔) (simplified) (la-verb)
- /la-conj-3rd/part ✴ (w/ latinp) (la-verb)
- /la-conj-3rd-IO+gloss ✔ (w/ latinv) (w/ optional parameter 2 (for verb-mac) ✔)
- /la-conj-3rd-IO/part ✴ (w/ latinp)
- /la-conj-4th+gloss ✴ (history: User:QuasiBot/la-conj-4th ⇒ ✴) (w/ latinv) (w/ optional parameter 2 (for verb-mac) ✔) (simplified) (la-verb)
- /la-conj-4th/part ✴ (w/ latinp) (la-verb)
Comments
- verb-mac in the DISTRIB pages is missing for the participles —QuasiBot (t) 03:45, 19 August 2010 (UTC)
- This shouldn't be hard to fix (1 regex per DISTRIB page). AugPi 03:49, 19 August 2010 (UTC)
- It's done! AugPi 06:07, 20 August 2010 (UTC)
Derived (i.e. reduced) templates/conjugations
- /la-conj-1st-nopass+gloss ✴ (history: User:QuasiBot/la-conj-1st+gloss ⇒ ✴) (NEEDS UPDATE TO NEWER FORMAT)
- /la-conj-1st-nopass/part ✴ (REDIR)
- /la-conj-1st-pass3p+gloss ✴
- /la-conj-1st-pass3p/part ✴ (REDIR)
- /la-conj-1st-depon+gloss ✴ (history)
- /la-conj-1st-depon/part ✴ (history)
- /la-conj-2nd-nopass (old school)
- /la-conj-2nd-nopass+gloss ✴ (history: User:QuasiBot/la-conj-2nd+gloss ⇒ ✴)
- /la-conj-2nd-nopass/part ✴ (REDIR)
- /la-conj-3rd-nopass+gloss ✴ (history: User:QuasiBot/la-conj-3rd+gloss ⇒ ✴)
- /la-conj-3rd-nopass/part ✴
- /la-conj-3rd-pass3p+gloss ✴
- /la-conj-3rd-pass3p/part ✴ (REDIR)
- /la-conj-3rd-depon (old school)
- /la-conj-3rd-nopass (old school)
- /la-conj-3rd-IO-nopass+gloss ✔ (history: /la-conj-3rd-IO+gloss ⇒ ✴) (NEEDS UPDATE TO NEWER FORMAT)
- /la-conj-4th-nopass+gloss ✴ (la-verb)
- /la-conj-4th-nopass/part ✴ (REDIR)
Comments
- Parameter 2 (for the "gloss" templates) works when subst'ing in directly, but it hasn't been set up to be included automatically when creating entries from a DISTRIB page. —QuasiBot (t) 14:51, 18 August 2010 (UTC)
- I have got an idea: instead of an optional parameter 2, there would be User:QuasiBot/verb-mac which would ordinarily contain a function which constructs the macronized form of the verb lemma based on available data, i.e. based on User:QuasiBot/verb, {{User:QuasiBot/{{User:QuasiBot/verb}}}}, {{User:QuasiBot/{{User:QuasiBot/verb}}/1}}. But if User:QuasiBot/verb has an irregular lemma, then User:QuasiBot/verb-mac would be replaced by a fixed string: the macronized spelling of the irregular lemma. Then User:QuasiBot/verb-mac would always be includeonly-subst'ed into "gloss" templates, taking in {{{1}}} as its own parameter 1. AugPi 15:57, 18 August 2010 (UTC)
- No: /verb is for direct use only in DISTRIB pages, not in "gloss" templates... because the entry creation templates should take in public variables as parameters and use only hidden constants, no hidden variables. AugPi 16:09, 18 August 2010 (UTC)
- Better idea: /verb-mac would be usually set to 0, and usually not be bothered with... its 0 value would tell the DISTRIB pages to ignore it. But if /verb-mac is not set to 0, then it would contain the macronized form of the irregular lemma. When the DISTRIB page sees this, it sends /verb-mac as parameter 2 to the entry-creation template. AugPi 16:14, 18 August 2010 (UTC)
- It's done! AugPi 06:08, 20 August 2010 (UTC)
Old school core templates
New templates (not listed above)
- User:QuasiBot/part ✴
- User:QuasiBot ✴
- User:QuasiBot/auto ✴
- User:QuasiBot/part/auto ✴
- User:QuasiBot/la-decl-3rd-part ✴ (history: Template:la-decl-3rd-part ⇒ ✴)
- User:QuasiBot/la-decl-1&2 ✴
- User:QuasiBot/la-decl-3rd-part/auto ✴
- User:QuasiBot/la-decl-1&2/auto ✴
- User:QuasiBot/latinv ✴
- User:QuasiBot/latinp ✴
- User:QuasiBot/latinv/main ✴
- User:QuasiBot/latinv/part ✴
- User:QuasiBot/eo ✴
QuasiBot's coordinating templates
QuasiBot's set-up/preparation templates
- /paramset ✔
- /0 ✔
- /0/verb-linker ✴
- /0/frame-create ✴
- /0/line-preload ✴
- /0/english-verb ✴
- /line-create ✴
QuasiBot's steering wheel [OBSOLETE now]
- /DISTRIB
✔✘ - /part/DISTRIB ✴ ✘