Jump to content

Wiktionary talk:Votes/bt-2012-07/User:Bot-Jagwar for bot status

Page contents not supported in other languages.
Add topic
From Wiktionary, the free dictionary
Latest comment: 12 years ago by Metaknowledge in topic Previous concerns

Per WT:BOT, can you post the code you'll be using, please?​—msh210 (talk) 15:41, 20 July 2012 (UTC)Reply

Python code of API transcriptor

[edit]

This is the code used to transcribe Malagasy words to phonological IPA pronunciation. It is part of a greater script so I've put only needed functions. For the

# -*- coding: utf-8  -*-
import wikipedia, catlib, pagegenerators
import wikipedia as pywikibot

def put_mg_on_en():
    uselang = 'mg'
    cat = pagegenerators.CategorizedPageGenerator(catlib.Category(pywikibot.getSite('en', 'wiktionary'), "Malagasy nouns"))
    for page in cat:
        c = page.get()
        if c.find('{{IPA|')!=-1:
            print 'efa misy fanononana!'
            continue
        c = c.replace('==Malagasy==','==Malagasy==\n===Pronunciation===\n{{IPA|/%s/|lang=mg}}'%getpron(page.title()))
        page.put(c, "[[Wiktionary:Votes/bt-2012-07/User:Bot-Jagwar for bot status|test phase for bot status]]) (putting word IPA pronunciation")

def getpron(page):
    page = page.lower()
    pron_dict  = {
        u'b' : u'b',
        u'c' : u's',
        u'd' : u'd',
        u'e' : u'e',
        u'f' : u'f',
        u'à' : u'ˈa',
        u'g' : u'g',
        u'h' : u'ʔ',
        u'i' : u'i',
        u'j' : u'd͡z',
        u'k' : u'k',
        u'l' : u'l',
        u'm' : u'm',
        u'n' : u'n',
        u'o' : u'u',
        u'p' : u'p',
        u'q' : u'k',
        u'r' : u'ɾ',
        u's' : u's',
        u't' : u't',
        u'u' : u'u',
        u'v' : u'v',
        u'w' : u'w',
        u'x' : u'kz',
        u'ñ' : u'ɳ',
        u'y' : u'ʲ',
        u'z' : u'z',
        u' ' : u' ',
        u'-' : u'',
        u"'" : u'',
        }
    prononciation = ''
    cont = 0
    nb_car_page = len(page)
    for let in page:
        try:
            prononciation += let.replace(let, pron_dict[let])
            cont += 1
        except KeyError:
            prononciation += let
            cont += 1
    prononciation = prononciation.replace(u'inku', u'iŋkʲu')
    prononciation = prononciation.replace(u'inka', u'iŋ͡kʲa')
    prononciation = prononciation.replace(u'ingu', u'iŋ͡gʲu')
    prononciation = prononciation.replace(u'inga', u'iŋ͡gʲa')
    prononciation = prononciation.replace(u'iku', u'ikʲu')
    prononciation = prononciation.replace(u'ts', u't͡s')
    prononciation = prononciation.replace(u'nt', u'n͡t')
    prononciation = prononciation.replace(u'ndɾ', u'nɖ͡ʐ')
    prononciation = prononciation.replace(u'ika', u'ikʲa')
    prononciation = prononciation.replace(u'dɾ', u'ɖ͡ʐ')
    prononciation = prononciation.replace(u'tɾ', u't͡ʂ')
    prononciation = prononciation.replace(u'nk', u'ŋ͡k')
    prononciation = prononciation.replace(u'ng', u'ŋ͡g')
    prononciation = prononciation.replace(u'mb', u'm͡b')
    prononciation = prononciation.replace(u'mp', u'm͡p')
    if prononciation[-1:] == u'a':
        prononciation = prononciation[:-1] + u'ạ'
    if prononciation[-1:] == u'u':
        prononciation = prononciation[:-1] + u'ʷ'
    if  prononciation[-1:] == u'y':
        prononciation =  prononciation[:-1] + u'ʲ'

    return prononciation

if __name__ == '__main__':
    try:
        put_mg_on_en()
    finally
        wikipedia.stopme()

--Jagwar (talk) 17:10, 20 July 2012 (UTC)Reply

Might I suggest {{IPA|/%s/|lang=mg}} instead of {{IPA|/%s/}}<!--Malagasy-->?​—msh210 (talk) 17:22, 20 July 2012 (UTC)Reply
Fixed. --Jagwar (talk) 17:27, 20 July 2012 (UTC)Reply

Previous concerns

[edit]

I see from glancing on your talk page that there were previous concerns about accuracy, including many bad page titles being created. Can you explain this problem, and how you fixed it (if you fixed it)? --Μετάknowledgediscuss/deeds 16:29, 20 July 2012 (UTC)Reply

Bad pages were due to the non-usage of regular expressions to find the appropriate language section. Also, it was picking word definitions as translations, so I put a string length filter and a word counter to make it skip suspect translations. --Jagwar (talk) 17:10, 20 July 2012 (UTC)Reply
OK. Do all (or at least the vast percentage) Malagasy terms on enwikt have definitions? --Μετάknowledgediscuss/deeds 17:26, 20 July 2012 (UTC)Reply
Yes. They are based on the work already done at the Malagasy Wiktionary. --Jagwar (talk) 17:27, 20 July 2012 (UTC)Reply
Then why are there so many definitionless terms at mgwikt? Were you involved in adding these definitionless terms? --Μετάknowledgediscuss/deeds 17:33, 20 July 2012 (UTC)Reply
A sizable portions of the monolingual dictionary were copyvio. So I had to delete and recreate them all per official request a few months ago. --Jagwar (talk) 17:42, 20 July 2012 (UTC)Reply
I see. Thank you for surviving all this questioning. --Μετάknowledgediscuss/deeds 18:11, 20 July 2012 (UTC)Reply
You're welcome. Thanks for your support :) --Jagwar (talk) 18:53, 20 July 2012 (UTC)Reply
I was involved in creations of these entries. But due to a misunderstanting, their content has to be removed (cf. main page explanation). And the decision is taken to keep them after all. --Jagwar (talk) 22:53, 20 July 2012 (UTC)Reply

I have re-supported, pending future discoveries. --Μετάknowledgediscuss/deeds 23:02, 20 July 2012 (UTC)Reply

With two admins (among which one watching like a hawk my past behaviours on my home wiki, and who knows, on other wikis) opposing the request, this issue isn't currently favorable. I hope you will find good things. --Jagwar (talk) 23:14, 20 July 2012 (UTC)Reply
Dan Polansky is not an admin. Also, although I disagree with him on many (most?) issues, I appreciate that he has provided ample links to allow us to understand a background that I would have otherwise not been aware of. Good luck to you too. --Μετάknowledgediscuss/deeds 00:02, 21 July 2012 (UTC)Reply

Bot owner's questions to the local community

[edit]

Can I also have some explanations about the fact that someone is pointing out my changes on my homewiki when I am asking for bot status on this wiki? --Jagwar (talk) 21:27, 20 July 2012 (UTC)Reply

Your bot-related deeds on mgwikt form the primary basis of what we have to go on in assessing the quality of your bot's work on enwikt. --Μετάknowledgediscuss/deeds 23:59, 20 July 2012 (UTC)Reply