show the links to senseids

Jump to navigation Jump to search

show the links to senseids

Hi Yair_rand, sorry to bring this up again, I am hoping you are not annoyed. I recently tried to link to the second definition of context#English-text_in_which_a_word_appears and added a gloss for it. The only way to get the correct link: http://en.wiktionary.org/wiki/context#English-text_in_which_a_word_appears is however only by looking at the HTML source currently (e.g. via FireBug) and copying the id attribute to the URL in the browser location bar. Recently I saw on GitHub, that they provide #-fragments for titles when you hover on them: https://github.com/NLP2RDF/persistence.uni-leipzig.org#workflow-for-the-ontologies It seems to be basic HTML and CSS:

<span class="octicon octicon-link"></span>
.markdown-body h2:hover a.anchor .octicon-link

You would know better, if any JS was involved. Would it be difficult to make something like this for Wiktionary sense definitions?

SebastianHellmann (talk)22:25, 30 May 2013

Definitely not annoyed. :)

It would be very simple to make something like this for Wiktionary sense definitions (either using JS or plain HTML+CSS), but I suspect that it wouldn't be a good idea. Github is a coding site, so all of its users can be expected to be reasonably technically competent, whereas there's a good chance that most Wiktionary users wouldn't understand at all what the link was doing, or even know what the hash changing meant (and probably wouldn't have any real use for it even if they did :/ ). For the average user, an extra icon appearing when the user hovers over a definition would probably just add confusion.

For users who do understand enough to know what the hash in the URL means, I would think (or at least hope) that many/most would realize fairly quickly (assuming that links to definitions are somewhat widespread) that the definition's link always matches the gloss, which can typically be found at least once on the page (in a translation table head or similar). Wiki editors would probably also know to look at the page source. This is not an ideal situation, but having another icon popping in and out of an already somewhat complex interface is probably not an overall benefit.

Yair rand (talk)13:36, 2 June 2013

Hm, maybe make it optional. I guess many users install their preferred gadgets anyhow. So we could offer it and then wait for adoption. I could promote it a little bit over Wiktionary2RDF (http://dbpedia.org/Wiktionary). Maybe make a screen cast. I guess, having these stable glosses would be a highly wanted feature in the NLP world. For example wordnet definitions have ids that change between each version and the changelog mapping has to be maintained manually.

SebastianHellmann (talk)18:22, 2 June 2013

Make the link icons optional? That could work, I guess. Full JS code would be $(".senseid").each(function(){var a;$(this).hover(function(){$(a).toggle();if(!a){a=document.createElement("a");a.href="#"+this.id;$(a).text("#").css({position:'absolute',zIndex:5,marginLeft:'-5px'});$(this).prepend(a);}})}) (possibly buggy), and I guess it could be added to either WT:PREFS or as gadget, or both.

Regular adoption of {{senseid}} is still essentially blocked by the fact that the regular linking templates don't support any way to link to the senses. With the deployment of Lua, I had hoped that {{l}} would have support added (as I proposed here), but things seem to be happening disappointingly slowly...

Yair rand (talk)21:57, 2 June 2013

Update: {{l}} now supports linking to senseids. Example: {{l|en|peach|id=fruit}} > peach .

Yair rand (talk)21:48, 7 July 2013