User talk:Conrad.Irwin/creationrules.js

Austrian neuter singular form edit

Please can you accelerate the neuter singular form in Asturian, by replacing the corresponding text with the text below:

// Asturian
creation_rules['ast'] =
	function (params, entry)
	{
		var template = {
			'plural':'plural of',
			'masculine-plural': 'masculine plural of',
			'feminine':'feminine of',
			'feminine-plural': 'feminine plural of',
			'neuter':'neuter of'};
 
		if (!template[params.form])
			throw new PreloadTextError('No rule for "' + params.form + '" in language "' + params.lang + '".');
 
		entry.def = '{{' + template[params.form] + '|' + params.origin + '|lang=' + params.lang + '}}';
	};

— This unsigned comment was added by Back on the list (talkcontribs) at 21:08, 4 March 2014‎.

Edit request edit

Can someone please add the following code in the appropriate position:

// Lojban rafsi
creation_rules['jbo'] =
	function (params, entry)
	{
		switch (params.form)
		{
			case 'rafsi':
				entry.pos_header = 'Rafsi';
				entry.head = '{{jbo-rafsi}}';
				entry.def = '{{jbo-rafsi of|' + params.origin + '}}';
				break;
			default:
				throw new PreloadTextError('No rule for "' + params.form + '" in language "' + params.lang + '".');
		}
	};

--kc_kennylau (talk) 08:27, 6 May 2014 (UTC)Reply

New rules for Russian nouns and Russian adverbs request edit

As per User:Conrad.Irwin/creation.js/documentation#Requesting_new_rules:

Request 1.

  1. What you want to generate the links for. That includes at least a link to the template whose links you want to make green.
    For {{ru-noun}} to generate genitive singular of and nominative plural of
  2. What the generated entries should look like. In particular, which headword-line template it should use, and which form-of template, which parameters they should receive in which situations, and so on. A link to a word that has blue links to all the forms in the template would work best, as an example.
    Should look like (genitive singular of) and (nominative plural of), (the new page should be the same in this case головы for both forms)
==Russian==

===Noun===
{{head|ru|noun form|head=головы́}}

# {{genitive singular of|голова́|lang=ru}}

===Noun===
{{head|ru|noun form|head=го́ловы}}

#: {{nominative plural of|голова́|lang=ru}}
  1. Ideally, a link to a word that has red links to all the forms. This is useful for testing to see if the generated entries are correct.
    Red link on голова́ (golová)

Request 2.

  1. {{ru-adv}} to generate comparative of forms.
==Russian==

===Adverb===
{{ru-adv|ре́же}}

# {{comparative of|POS=adverb|ре́дко|lang=ru}}
  1. Red link on ре́дко (rédko)

--Anatoli (обсудить/вклад) 00:16, 4 June 2014 (UTC)Reply

Making it so that it collapses both forms onto the same page if they are identical will take a bit of work on the headword template itself. The creation script can't do that. But in any case, wouldn't it make more sense to make a form bot and use it on the declension table? Then you'd cover all the forms. —CodeCat 00:21, 4 June 2014 (UTC)Reply
Thanks for the answer.
Re: will take a bit of work. I may have chosen a bad example then. If only one form is generated, I'd be happy. The other one can be added manually.
Re: wouldn't it make more sense to make a form bot and use it on the declension table. Yes, definitely but I just don't know what's possible and I thought I'd ask what seems to be feasible and is more likely to be done in the near future. I don't know anything about form bots, who makes them and where to ask. It would be great to cover all inflected forms not just for nouns but for verbs, adjectives, pronouns, etc. --Anatoli (обсудить/вклад) 00:28, 4 June 2014 (UTC)Reply
@CodeCat Could you help with the first two requests, please? A form bot is also great but I imagine it's much harder and longer task. --Anatoli (обсудить/вклад) 03:21, 4 June 2014 (UTC)Reply
Ok, I added rules for adverb comparatives. —CodeCat 11:42, 4 June 2014 (UTC)Reply
Thank you. Could you make the plural noun form as well, please? --Anatoli (обсудить/вклад) 12:37, 4 June 2014 (UTC)Reply
I think that would do more harm than good in the long run. If we start creating lots of plural entries now, then if we ever do set up a form bot, then it will have a lot of trouble with those entries. —CodeCat 12:43, 4 June 2014 (UTC)Reply

Please add (Moksha, Erzya, Latvian (nouns) edit

Thanks. Neitrāls vārds (talk) 17:16, 8 September 2015 (UTC)Reply

// Moksha
creation_rules['mdf'] =
	function (params, entry)
	{
		var formparam = {
			'indefinite-plural-nominative':'indef|p|nom',
			'indefinite-singular-genitive':'indef|s|gen',
			'indefinite-plural-genitive':'indef|p|gen',
			'indefinite-singular-dative':'indef|s|dat',
			'indefinite-plural-dative':'indef|p|dat',
			'indefinite-singular-ablative':'indef|s|abl',
			'indefinite-plural-ablative':'indef|p|abl',
			'indefinite-singular-inessive':'indef|s|ine',
			'indefinite-plural-inessive':'indef|p|ine',
			'indefinite-singular-elative':'indef|s|ela',
			'indefinite-plural-elative':'indef|p|ela',
			'indefinite-singular-illative':'indef|s|ill',
			'indefinite-plural-illative':'indef|p|ill',
			'indefinite-singular-prolative':'indef|s|prolative',
			'indefinite-plural-prolative':'indef|p|prolative',
			'indefinite-singular-comparative':'indef|s|comparative',
			'indefinite-plural-comparative':'indef|p|comparative',
			'indefinite-singular-translative':'indef|s|tra',
			'indefinite-plural-translative':'indef|p|tra',
			'indefinite-singular-abessive':'indef|s|abe',
			'indefinite-plural-abessive':'indef|p|abe',
			'indefinite-singular-causative':'indef|s|causative',
			'indefinite-plural-causative':'indef|p|causative',
			'definite-singular-nominative':'def|s|nom',
			'definite-plural-nominative':'def|p|nom',
			'definite-singular-genitive':'def|s|gen',
			'definite-plural-genitive':'def|p|gen',
			'definite-singular-dative':'def|s|dat',
			'definite-plural-dative':'def|p|dat',

			'possessive':'possessive',

			'first-person-singular-copulative':'1|s|copulative',
			'second-person-singular-copulative':'2|s|copulative',
			'third-person-singular-copulative':'3|s|copulative',
			'first-person-plural-copulative':'1|p|copulative',
			'second-person-plural-copulative':'2|p|copulative',
			'third-person-plural-copulative':'3|p|copulative',

			'first-person-singular-present-indicative':'1|s|pres|ind',
			'second-person-singular-present-indicative':'2|s|pres|ind',
			'third-person-singular-present-indicative':'3|s|pres|ind',
			'first-person-plural-present-indicative':'1|p|pres|ind',
			'second-person-plural-present-indicative':'2|p|pres|ind',
			'third-person-plural-present-indicative':'3|p|pres|ind',

			'first-person-singular-past-indicative':'1|s|past|ind',
			'second-person-singular-past-indicative':'2|s|past|ind',
			'third-person-singular-past-indicative':'3|s|past|ind',
			'first-person-plural-past-indicative':'1|p|past|ind',
			'second-person-plural-past-indicative':'2|p|past|ind',
			'third-person-plural-past-indicative':'3|p|past|ind',

			'first-person-singular-subjunctive':'1|s|sub',
			'second-person-singular-subjunctive':'2|s|sub',
			'third-person-singular-subjunctive':'3|s|sub',
			'first-person-plural-subjunctive':'1|p|sub',
			'second-person-plural-subjunctive':'2|p|sub',
			'third-person-plural-subjunctive':'3|p|sub',

			'second-person-singular-imperative':'2|s|imp',
			'second-person-plural-imperative':'2|p|imp',

			'connegative':'connegative',
			'gerund-connegative':'gerund|connegative'};
		
		if (!formparam[params.form])
			throw new PreloadTextError('No rule for "' + params.form + '" in language "' + params.lang + '".');
		
		entry.def = '{{inflection of|' + params.origin + '||' + formparam[params.form] + '|lang=' + params.lang + '}}';
	}
// Erzya
creation_rules['myv'] =
	function (params, entry)
	{
		var formparam = {
			'indefinite-plural-nominative':'indef|p|nom',
			'indefinite-singular-genitive':'indef|s|gen',
			'indefinite-plural-genitive':'indef|p|gen',
			'indefinite-singular-dative':'indef|s|dat',
			'indefinite-plural-dative':'indef|p|dat',
			'indefinite-singular-ablative':'indef|s|abl',
			'indefinite-plural-ablative':'indef|p|abl',
			'indefinite-singular-inessive':'indef|s|ine',
			'indefinite-plural-inessive':'indef|p|ine',
			'indefinite-singular-elative':'indef|s|ela',
			'indefinite-plural-elative':'indef|p|ela',
			'indefinite-singular-illative':'indef|s|ill',
			'indefinite-plural-illative':'indef|p|ill',
			'indefinite-singular-prolative':'indef|s|prolative',
			'indefinite-plural-prolative':'indef|p|prolative',
			'indefinite-singular-comparative':'indef|s|comparative',
			'indefinite-plural-comparative':'indef|p|comparative',
			'indefinite-singular-translative':'indef|s|tra',
			'indefinite-plural-translative':'indef|p|tra',
			'indefinite-singular-abessive':'indef|s|abe',
			'indefinite-plural-abessive':'indef|p|abe',
			'definite-singular-nominative':'def|s|nom',
			'definite-plural-nominative':'def|p|nom',
			'definite-singular-genitive':'def|s|gen',
			'definite-plural-genitive':'def|p|gen',
			'definite-singular-dative':'def|s|dat',
			'definite-plural-dative':'def|p|dat'
			'definite-singular-ablative':'def|s|abl',
			'definite-plural-ablative':'def|p|abl',
			'definite-singular-inessive':'def|s|ine',
			'definite-plural-inessive':'def|p|ine',
			'definite-singular-elative':'def|s|ela',
			'definite-plural-elative':'def|p|ela',
			'definite-singular-illative':'def|s|ill',
			'definite-plural-illative':'def|p|ill',
			'definite-singular-prolative':'def|s|prolative',
			'definite-plural-prolative':'def|p|prolative',
			'definite-singular-comparative':'def|s|comparative',
			'definite-plural-comparative':'def|p|comparative',
			'definite-singular-translative':'def|s|tra',
			'definite-plural-translative':'def|p|tra',
			'definite-singular-abessive':'def|s|abe',
			'definite-plural-abessive':'def|p|abe'};
		
		if (!formparam[params.form])
			throw new PreloadTextError('No rule for "' + params.form + '" in language "' + params.lang + '".');
		
		entry.def = '{{inflection of|' + params.origin + '||' + formparam[params.form] + '|lang=' + params.lang + '}}';
	}
// Latvian (only nouns)
creation_rules['lv'] =
	function (params, entry)
	{
		var formparam = {
			'plural-nominative':'nom|p',
			'singular-genitive':'gen|s',
			'plural-genitive':'gen|p',
			'singular-dative':'dat|s',
			'plural-dative':'dat|p',
			'singular-accusative':'acc|s',
			'plural-accusative':'acc|p',
			'singular-instrumental':'ins|s',
			'plural-instrumental':'ins|p',
			'singular-locative':'loc|s',
			'plural-locative':'loc|p',
			'singular-vocative':'voc|s',
			'plural-vocative':'voc|p'};
		
		if (!formparam[params.form])
			throw new PreloadTextError('No rule for "' + params.form + '" in language "' + params.lang + '".');
		
		entry.def = '{{lv-inflection of|' + params.origin + '|' + formparam[params.form] + '}}';
	}
@Neitrāls vārds: Added. Be careful next time, because the missing comma in
'definite-plural-dative':'def|p|dat'
costed me 15 minutes. --kc_kennylau (talk) 14:29, 6 February 2016 (UTC)Reply

Edit request: Danish edit

First of all, please correct the line

'genitive-singular-indefinite':'genitive singular definite of',

to

'genitive-singular-indefinite':'genitive singular indefinite of',

This is used in {{da-noun-infl}}.

Secondly, for the verb section please expand to include

'passive':'passive of',
'passive-past':'passive past tense of',
'present-participle':'present participle of',

This should use {{passive of}}, {{passive past tense of}} and {{present participle of}}. nedgøre has underlined links for the appropriate forms when using {{da-conj}}; spise has all blue links.

Thirdly, please add an adjective section with

'neuter':'neuter singular of',
'definite-and-plural':'definite and plural of',
'comparative':'comparative of'

This should use {{neuter singular of}}, {{definite and plural of}} and {{comparative of}}. {{da-adj}} generates underlined links on blågrøn, but blue links for fin.

Headword-line template should in all these cases be {{head}}, with first parameter da and second parameter noun form, verb form or adjective form. The form-of templates mentioned should use the lemma form as first parameter and lang=da as second.

I don't know what to do about superlatives and verbal nouns yet, so please just leave them for now.__Gamren (talk) 11:50, 25 July 2016 (UTC)Reply

@Gamren: Done. --kc_kennylau (talk) 12:25, 14 August 2016 (UTC)Reply

Change of heading of Mandarin Pinyin edit

@Conrad.Irwin The heading for Mandarin Pinyin entries should be "Mandarin", instead of "Chinese". Could you please amend? Thank you.Jonashtand (talk) 17:25, 16 May 2018 (UTC)Reply

Edit request: Finnish nominal forms edit

I implemented the creation of Finnish noun (nominal) forms. Verb forms get really complicated, so they are not implemented for now (but they do have headparam ready for when that happens). I also could not implement comitative, since it requires alt forms (see koirineen for an example).

// Finnish
creation_rules['fi'] =
	function (params, entry)
	{
		var headparam = {};
		var formparam = {
			'plural-nominative':'case=nominative|pl=plural',
			'singular-genitive':'case=genitive|pl=singular',
			'plural-genitive':'case=genitive|pl=plural',
			'singular-partitive':'case=partitive|pl=singular',
			'plural-partitive':'case=partitive|pl=plural',
			'singular-inessive':'case=inessive|pl=singular',
			'plural-inessive':'case=inessive|pl=plural',
			'singular-elative':'case=elative|pl=singular',
			'plural-elative':'case=elative|pl=plural',
			'singular-illative':'case=illative|pl=singular',
			'plural-illative':'case=illative|pl=plural',
			'singular-adessive':'case=adessive|pl=singular',
			'plural-adessive':'case=adessive|pl=plural',
			'singular-ablative':'case=ablative|pl=singular',
			'plural-ablative':'case=ablative|pl=plural',
			'singular-allative':'case=allative|pl=singular',
			'plural-allative':'case=allative|pl=plural',
			'singular-essive':'case=essive|pl=singular',
			'plural-essive':'case=essive|pl=plural',
			'singular-translative':'case=translative|pl=singular',
			'plural-translative':'case=translative|pl=plural',
			'plural-instructive':'case=instructive|pl=plural',
// 			'plural-comitative':'case=comitative|pl=plural', // needs alt forms
			'singular-abessive':'case=abessive|pl=singular',
			'plural-abessive':'case=abessive|pl=plural'};

		if (!formparam[params.form])
			throw new PreloadTextError('No rule for "' + params.form + '" in language "' + params.lang + '".');
		
        entry.head = '{{head|' + params.lang + '|' + (headparam[params.form] || params.pos + ' form') + '}}';
		entry.def = '{{fi-form of|' + params.origin + '|' + formparam[params.form] + '}}';
	};

SURJECTION ·talk·contr·log· 16:53, 12 June 2018 (UTC)Reply

Return to the user page of "Conrad.Irwin/creationrules.js".