Remove duplicates when there are multiple heads

Jump to navigation Jump to search

Remove duplicates when there are multiple heads

Edited by 0 users.
Last edit: 00:15, 15 October 2014

The entry for أنتليجنسيا has one Arabic vocalization with two possible transliterations, representing two different pronunciations. This is expressed using 1= and head2=, but for this to work properly, the code in Module:headword should check for and remove duplicate heads. (I already do this in various places in Module:ar-verb; you could reuse e.g. the contains() and insert_if_not() functions from there.) Thanks.

Benwing (talk)00:15, 15 October 2014

This doesn't work because Module:headword expects each transliteration to match up with its corresponding headword. If we're going to allow multiple headwords and multiple transliterations per headword, it'll get really messy. Furthermore, no other template on Wiktionary supports multiple transliterations for a single term.

CodeCat00:17, 15 October 2014

What I'm asking you to do is to modify line 287 so that you copy 'heads' to a new array with duplicates removed before concatenating. This is easy to do. I would do this myself if I had permission to modify this file. Take a look at أنتليجنسيا and you'll see what I'm talking about.

Benwing (talk)00:32, 15 October 2014

You have to consider the implications of such a change though. Let's say that you have these parameters: head=A|head2=A|head3=B|tr=X|tr2=Y|tr3=Z. If your change is implemented, that ends up looking like this:

A or B (X or Y or Z)

It's now no longer obvious which transliteration belongs to which headword.

Concerning this specific case, though, what you're doing seems to be something other than transliteration. You're really adding additional pronunciation details into the transliteration field. Those should really go in the pronunciation section. Transliteration should not be used as a substitute for such distinctions.

CodeCat00:41, 15 October 2014