User:Envlh/Lexemes Party

Lexemes Party is a tool that shows lexemes related to a list of Wikidata concepts. It can serve several usages like:

  • Give an overview of the coverage of lexicographical data in Wikidata for a list of Wikidata items. Example: Planets of the Solar System
  • Work with a list of Wikidata items to improve a specific language. Example: Animals

The tool relies on a choosen property to get the links between senses and Wikidata concepts.

Lexemes Party edit

Inputs edit

Title (optional)

Title of the party, that is used in the title of the page, so you can easily manage your bookmarks and meaningfully share your party.

SPARQL query (mandatory)

A SPARQL query which returns a list of Wikidata items in the variable ?concept. Two approaches can be used:

  • Write a conventional query that returns a list of concepts. Example:
    SELECT ?concept {
      wd:Q51401 p:P462 [ rdf:type wikibase:BestRank ; ps:P462 ?concept ; pq:P1545 ?rank ]
    }
    ORDER BY xsd:integer(?rank)
    
  • Hardcode the concepts ids in the query. Example:
    SELECT ?concept {
      VALUES ?concept { wd:Q9610 wd:Q36236 wd:Q56475 wd:Q33578 wd:Q32238 wd:Q1860 }
    }
    
Properties (mandatory)

A list of properties (separated by a space) that link senses to the concepts returned by the preceding SPARQL query. Examples:

Language filter (optional)

A list of languages identifiers, that can be a mix of:

The list can work either as an allow list (to work only with specified languages) or as a block list (to prevent specified languages to appear in results).

Display

The results can be displayed in two ways:

  • languages in rows and concepts in columns, which is best for a large number of languages,
  • languages in columns and concepts in rows, which is best for a large number of concepts.
Display language

Code of a language as existing in Wikimedia projects. Example: de

The results are localized (labels, links to Wikidata and Wiktionary, etc.) using this code. With auto, the tool will try to find the preferred language from your web browser, and fallback to English.

Mode

The full mode displays more information and the compact mode is more readable.

Results edit

The tool displays senses linked with the properties specified in the form (by default item for this sense (P5137)) to the retrieved Wikidata concepts.

For each sense, a link to this sense is available, with all lemmas of the related lexeme (sorted alphabetically). You can hover a link to get the lexical category of the related lexeme.

Cache edit

The data is retrieved from Wikidata using SPARQL queries. These queries are cached from 5 minutes to 24 hours.

Lexemes Challenge edit

Rules edit

  • A challenge is proposed each week, usually starting on Monday at 12:00 UTC.
  • Monitored properties are item for this sense (P5137), predicate for (P9970), and demonym of (P6271).
  • A challenge is usually composed of a list of 7 themed Wikidata concepts. These Wikidata items must have at least labels in 20 languages, 15 statements and 10 sitelinks, which can be checked with this query:
    SELECT ?concept ?conceptLabel (COUNT(DISTINCT LANG(?label)) AS ?labels) ?statements ?sitelinks {
      VALUES ?concept { wd:Q39631 wd:Q185196 wd:Q774306 wd:Q27349 wd:Q186360 wd:Q105186 wd:Q202883 } .
      ?concept wikibase:statements ?statements ; wikibase:sitelinks ?sitelinks ; rdfs:label ?label .
      SERVICE wikibase:label { bd:serviceParam wikibase:language "[AUTO_LANGUAGE],en" }
    }
    GROUP BY ?concept ?conceptLabel ?statements ?sitelinks
    ORDER BY ?labels ?statements ?sitelinks
    

Parameters edit

id

Id of the challenge. Example: 7

language_display

Language code to display the results. While only ISO 639-1 code (P218) are proposed, any code from Wikidata labels can be used. Example: nov

table

Parameter to show current results (default) or at the start (reference) and the end (final) of the challenge.

Notifications edit

A Twitter bot tweets the start and the end of challenges.

Links edit