User:Scsbot/examples

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

Adding rhymes[edit]

Here is the edit script for adding rhymes. It accepts one additional parameter, which is the IPA pronunciation of the rhyme. Here is the pre check script called before adding rhymes. (It does a very simpleminded check for the string "Rhyme:" or "Rhymes:" and could therefore easily suffer false positives -- but that just means that the script won't add the rhyme. I'll worry about those in the next round.)

An example driver script for adding rhymes is:

bag    -æɡ
dawn   -ɔːn
fawn   -ɔːn
thorn  -ɔː(r)n

An example "master script" encapsulating the rhyme-adding process is

editscript addrhyme
checkscript checkrhyme
reason added English rhyme
checkdiffs

Adding rhyme "breadcrumb" backlinks[edit]

Here is the edit script for adding breadcrumbs. It accepts one additional parameter, which is the IPA pronunciation of the rhyme. Here is the pre check script called before adding breadcrumbs. It makes sure that there isn't already a breadcrumb trail, and that the first line of the page (which the add script will be blindly inserting before) is the Pronunciation header.

An example driver script for adding breadcrumbs is:

Rhymes:English:-%C3%A6%C5%8B%C9%99%28r%29       æ       æŋə(r)
Rhymes:English:-%C3%A6%C5%8B%C9%A1%C9%99%28r%29 æ       æŋɡə(r)
Rhymes:English:-%C3%A6%C5%8B%C9%A1%C9%99%CA%8A  æ       æŋɡəʊ
Rhymes:English:-%C3%A6%C5%8B%C9%A1%C9%99l       æ       æŋɡəl
Rhymes:English:-%C3%A6%C5%8B%C9%AA%C5%8B        æ       æŋɪŋ

(Notice that there are two additional parameters: the parent ("stressed on") pronunciation, and the pronunciation of the particular page.)

An example "master script" encapsulating the rhyme-adding process is

editscript addrhymepagebreadcrumb
checkscript checkrhymepagepunc
reason added breadcrumb backlinks
checkdiffs
expectedinsert 4