User talk:Taxman1913/Sandbox

From Wiktionary, the free dictionary
Latest comment: 9 years ago by Taxman1913 in topic Too complex
Jump to navigation Jump to search

Too complex

[edit]

This template is much too complex and tries to do too many things that it shouldn't. Some points to note:

  1. The template should use {{head}} internally, which handles a lot of the things that you wrote custom code for.
  2. Using numbers to indicate different types of countability is too confusing and nonintuitive. It would make a lot more sense to derive countability through the plural parameter.
  3. We already agreed not to have entries for the suffixes. There are too many parameters anyway; if you set them all to yes, they won't even fit on the line anymore.
  4. The template should only be used for lemmas. For non-lemmas, use {{head|id|noun form}}. However, I'm not sure which non-lemma forms are actually left if we exclude plurals and suffixes.
  5. The common practice is make templates treat any non-empty value as "yes", so not requiring someone to type the word "yes" explicitly. Most entries simply use the number 1 as the value when an option is to be activated, and leaving it empty (the default) leaves the option deactivated.
  6. For proper nouns, the common practice is to have a separate template. I suppose it's not strictly necessary, though. If you keep it this way, see my note about "yes" above.
  7. Topical categories should be placed at the bottom of the entry, not included in the headword template.

CodeCat 01:14, 11 January 2015 (UTC)Reply

Template:Reply to Thank you for your feedback.
The template isn't as complex as It might appear. I plan to beak it into two separate templates. One will be for the headword; the other will produce an inflections table.
I didn't invoke {{head}}, because I want it to say "plural not attested" by default. This will be incredibly common for Indonesian nouns. I couldn't figure out how to make that work with {{head}}.
I don't see how using numbers to indicate countability is any less intuitive than the dashes and tildes used by {{en-noun}}. How can you derive countability of "countable and uncountable" or "usually uncountable" from the plural parameter? I've done the opposite; no plural entry is possible for uncountable nouns.
I messed around with seeing how several of the inflections would look on the headword line, so I could see it. I've abandoned that in favor of a separate table which will ultimately be crea0ted by a separate template.
Although more than 99% of the inflected forms don't need entries on Wiktionary, a few particular ones do. For this reason, an inflection section should appear on the pages of those words. In most of the rare cases when it ill be used, it will have only one entry. This is why I originally thought it might make sense to just tack it onto the headword. But as you said, there are just too many parameters, and it would probably take me weeks to code it.
If this template will work fine for non-lemmas, why wouldn't it be ok to use it? You are correct. There are very few non-lemmas. One example would be sebuah which is a form of buah (fruit). In that inflection, it could mean a fruit or it could be an indefinite article. Sebuah rumah means a house. The second meaning pushes the word up to the level of something that merits inclusion, since it isn't even the same part of speech. Once there is a dictionary entry for it, the definition as a noun should be given as well, since it is certainly attestable.
I haven't tested it yet, but I'm pretty sure that anything where my template looks for "yes", an entry of "1" will also be treated as "yes". This is just a matter of changing the documentation.
It wasn't difficult to add proper nouns to this template.
What are the disadvantages of including topical categories in the template? Wouldn't it encourage people to use them? They are easily automated, and providing an option for up to five categories saves a few keystrokes for editors: "|cat1=Water" is 10 fewer keystrokes than "[[Category:id:Water]]". Taxman1913 (talk) 16:51, 11 January 2015 (UTC)Reply
It's not just a matter of convenience but also of prior experience with other entries. If different languages use different standards for things, it becomes harder to manage. The practice is to include topical categories separately and I think most people would object to doing it any other way. Maintaining consistency is important in a large project like Wiktionary.
Concerning countability, the vast majority of languages have templates that treat nouns as uncountable whenever the plural is "-". {{en-noun}} is only one of very few exceptions where there are more options than just countable and uncountable, but even that still works the same way. Having a separate countability parameter would make this template different from every other template on Wiktionary, which will confuse other editors who have to learn the unique way in which this one works, and increase the mental load of learning how to edit Wiktionary overall. —CodeCat 17:54, 11 January 2015 (UTC)Reply
I've now rearranged the code, so that it uses {{head}} instead. I've done it in steps, and provided edit summaries with each one, so that you can follow the changes I made incrementally. You can see it in the page's history. The code still does the same thing, so all the parameters work as they did before, and things display mostly the same. I'd be glad to answer any questions you may have. —CodeCat 18:41, 11 January 2015 (UTC)Reply
Template:Reply to I really appreciate all your help. It is obvious that I'm not very experienced in this. But it is tough to keep up with you. I was in the midst of changing the "pl" that I screwed up back to "plural," and I got an edit conflict, because you ad already done it. It is as though I started this project and have now imposed it upon you. The rearrangements you did are so much better than I ha it before. But as I'm going through them, I'm trying to learn and improve.
I think the pl2 attribute is redundant. The way I had the original code written, I needed it. But with the structure you have, I think that an editor can enter values of 2, x or anything else in the world, and it should work fine. I'm trying to figure out what to change and mak mysef certain that it can be done. Am I right? Taxman1913 (talk) 12:44, 12 January 2015 (UTC)Reply
I've made some more changes. I'm sorry that you can't keep up, but I'd be happy to explain it if you have any questions. I updated the documentation as well. What it does now, is that you can specify two plurals using the positional parameters. The first positional parameter can be "-", which indicates that the noun is uncountable. If you specify both "-" and one or two plurals, it becomes "countable and uncountable". I changed the examples at Wiktionary:Sandbox so you can see. —CodeCat 13:05, 12 January 2015 (UTC)Reply
Template:Reply to It would be easy to ask you questions, but I will learn more by struggling to figure it out for myself. Thanks again for your help with this. Taxman1913 (talk) 13:17, 12 January 2015 (UTC)Reply
Template:Reply to I need a little time to go through this. I have a few ideas, but I want to collect all my thoughts to see if they make sense. I need to go to Singapore for the day tomorrow. I'll get back to you on Wednesday. Taxman1913 (talk) 18:22, 12 January 2015 (UTC)Reply