Wiktionary talk:Votes/bt-2009-09/User:Conrad.Bot to do anagrams

From Wiktionary, the free dictionary
Latest comment: 14 years ago by Conrad.Irwin in topic template:exclude anagrams
Jump to navigation Jump to search

template:exclude anagrams

[edit]

How is this template supposed to work? Or, where is it supposed to be used? If used in the {anagrams:langcode/foo} template, it will force exclusion of a particular anagram from all pages, which is not what's intended. (Just because a word is not wanted as an anagram to an entry of which it's an alt.sp., that doesn't mean it's not wanted elsewhere. E.g., liter, arguendo (for I disgree, myself), shouldn't be listed as an anagram of litre, but surely it should be listed as an anagram of relit.)​—msh210 17:49, 14 September 2009 (UTC)Reply

Initially I was going to exclude all the alt-sp things from the templates, however people on WT:BP seemed to think that they should still be included. My original idea included the template {{not anagrams}} to exclude everything in the template from everything in the template, you are correct that {{exclude anagrams}} is too blunt for this purpose. Creating and enabling {{not anagrams}} is possible, if you'd like it. Conrad.Irwin 23:53, 14 September 2009 (UTC)Reply
I didn't fully understand your reply here when I first read it, and attributed that, hopefully, to a fluke; I still don't, so must actually be dense. Where would {not anagrams} be transcluded, what would its parameters be, and what would its effect be? Thanks.​—msh210 16:01, 15 September 2009 (UTC)Reply
There are several ways it could work, I had thought of it as just a flag (like {{exclude anagrams}}), causing the bot to add some exclusion parameters to the templates, but actually it could be directly included in the calls to {{anagrams}}. The templates would then look something like (one or the other of):
* {{anagrams|liter|l-iter|liter!litre=}} {{anagrams|litre|l-itre|litre!liter=}} {{not anagrams|liter|litre}}
* {{anagrams|{{not anagrams|liter|litre=}}|l-iter}} {{anagrams|{{not anagrams|litre|liter=}}|l-itre}}

The effect in either case is to display *l-iter on litre, and *l-itre on liter, *liter, l-iter on l-itre and *litre, l-itre on l-iter. For cases when no anagrams for a page would display, the bot would not transclude the template onto that page. I hope that's clearer, though knowing me, probably not. Conrad.Irwin 21:25, 15 September 2009 (UTC)Reply

no anagrams

[edit]

What will the bot do if a word has no anagrams in enwikt? Not add {anagrams:langcode/foo} to the entry, or add it, but blank, or add it, but with the alphagram only?​—msh210 17:49, 14 September 2009 (UTC)Reply

It will not add it to the entry nor create the template unless there are two useful lines. Conrad.Irwin 23:54, 14 September 2009 (UTC)Reply

hand-added anagrams

[edit]

What will the bot do for entries that have anagrams listed by hand which are not enwikt entries (e.g., SoPs)? Is there a mechanism for removal of these? (I hope not!) Or, how does it integrate its anagrams into existing lists? Moreover, when users add such words to {anagrams:langcode/foo}, will the bot revert? Can users add unlinked — or "SoP-linked" (as separate words) — to the list in that template?​—msh210 17:49, 14 September 2009 (UTC)Reply

Inclusion of anagrams can be forced using {{include anagrams}}, I was planning (but have not yet, as there is no need) to have it compare revisions either side of manual edits so that users didn't even have to think about it. This is how it will preserve all the anagrams that are currently in entries. Conrad.Irwin 23:57, 14 September 2009 (UTC)Reply

Another few questions

[edit]

Does it work for all languages, all Latin alphabet languages, or just English? How does it deal with capital letters and diacritics. Mglovesfun (talk) 17:54, 14 September 2009 (UTC)Reply

It can be made to work for any language I can find out the details of anagrams in. It sounds like French is the same as English, ignore case and diacritics, split up æ and similar, don't include "words" with numbers in, and someone mentioned that Spanish is similar except that n~ is counted as a different letter. As with indexing, every language needs a native speaker to confirm the details of the process - there are obviously some languages in which it doesn't work, Chinese, perhaps; but I would think most languages with reasonable sized alphabets have a similar idea. Conrad.Irwin 00:01, 15 September 2009 (UTC)Reply