We'd like to use a widget that @Jdrewniak has been working on - as a beta (test) for English Wikipedia. This widget is using an experimental API that displays a definition from English Wiktionary, based on the query imputed and is only displayed on the search engine results page (SERP) if a definition is found.
To view this widget - add in the following to your common.js file on en.wiki:
importScript( 'User:JDrewniak_(WMF)/wiktionaryDefinitionInSearchResults.js' ); Backlink: [[User:JDrewniak_(WMF)/wiktionaryDefinitionInSearchResults.js]]
Before this widget can get to a full beta status, there are a few things we'd like to update:
- add link to the actual definition shown by using the 'Definition' word as the link
- add link to a search results page on wiktionary.org for all results for the definition, using the 'wiktionary.org' word as the link
- wiktionary.org experimental API might need to be updated to:
- expose the obsolete flag so that we can disregard that entry (and not display obsolete entries)
- display the most common definition
- when displayed with the sister project search results, don't have the sister project results pushed down the page on the right hand side:
- also, there is a known issue where the wiktionary widget displays (oftentimes) a different definition than what we show in the sister project search results. This is because the experimental API for the wiktionary widget displays the first result it finds and the sister project search results displays the top ranked/used definition. Let's see if we can get these definitions synced up. Here's a screenshot of an example: