User:TweetsFactsAndQueries/Queries/Tolkien plurals
Jump to navigation
Jump to search
Try it!
Originally posted on Twitter and on Mastodon.
SELECT ?lexeme ?singular ?plural ?tolkienPlural WHERE {
?lexeme dct:language wd:Q1860;
wikibase:lexicalCategory wd:Q1084;
ontolex:lexicalForm ?singularForm, ?pluralForm.
?singularForm wikibase:grammaticalFeature wd:Q110786;
ontolex:representation ?singular.
?pluralForm wikibase:grammaticalFeature wd:Q146786;
ontolex:representation ?plural.
FILTER(STRENDS(?singular, "f"))
FILTER(STRENDS(?plural, "fs"))
BIND(STRLANG(CONCAT(IF(STRENDS(?plural, "ffs"), SUBSTR(?plural, 1, STRLEN(?plural) - 3), SUBSTR(?plural, 1, STRLEN(?plural) - 2)), "ves"), LANG(?plural)) AS ?tolkienPlural)
MINUS {
?lexeme ontolex:lexicalForm ?tolkienPluralForm.
?tolkienPluralForm wikibase:grammaticalFeature wd:Q146786;
ontolex:representation ?tolkienPlural.
}
}
ORDER BY MD5(?singular)