forked from emijrp/wikidata
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
16 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,7 @@ | ||
#!/usr/bin/env python3 | ||
# -*- coding: utf-8 -*- | ||
|
||
# Copyright (C) 2017-2019 emijrp <[email protected]> | ||
# Copyright (C) 2017-2021 emijrp <[email protected]> | ||
# This program is free software: you can redistribute it and/or modify | ||
# it under the terms of the GNU General Public License as published by | ||
# the Free Software Foundation, either version 3 of the License, or | ||
|
@@ -513,6 +513,9 @@ def main(): | |
'family name': { | ||
'sq': ['mbiemri'], #because "mbiemri" = "the family name" | ||
}, | ||
'galaxy': { | ||
'es': ['galaxy'], | ||
}, | ||
'species of insect': { | ||
'sq': ['specie e insekteve'], #https://github.com/emijrp/wikidata/pull/47 | ||
}, | ||
|
@@ -912,7 +915,7 @@ def main(): | |
'ca': 'galàxia', | ||
'en': 'galaxia', | ||
'eo': 'galaksio', | ||
'es': 'galaxy', | ||
'es': 'galaxia', | ||
'fr': 'galaxie', | ||
'gl': 'galaxia', | ||
'pt': 'galáxia', | ||
|
@@ -2633,16 +2636,18 @@ def main(): | |
""" | ||
SELECT ?item | ||
WHERE { | ||
?item wdt:P31 wd:Q4167410 ; | ||
wdt:P31 ?instance . | ||
?item schema:description "Wikimedia disambiguation page"@en. | ||
SERVICE bd:sample { | ||
?item wdt:P31 wd:Q4167410 . | ||
bd:serviceParam bd:sample.limit %s . | ||
bd:serviceParam bd:sample.sampleType "RANDOM" . | ||
} | ||
?item schema:description "Wikimedia disambiguation page"@en. | ||
OPTIONAL { ?item schema:description ?itemDescription. FILTER(LANG(?itemDescription) = "%s"). } | ||
FILTER (!BOUND(?itemDescription)) | ||
} | ||
GROUP BY ?item | ||
HAVING(COUNT(?instance) = 1) | ||
LIMIT %s | ||
OFFSET %s | ||
""" % (str(querylimit), str(offset)) for offset in range(0, 2000000, querylimit) | ||
], | ||
#random%s | ||
""" % (str(querylimit+i), random.choice(list(translations['Wikimedia disambiguation page'].keys())), random.randint(1,1000000)) for i in range(1, 10000) | ||
], | ||
|
||
'Wikimedia list article': [ | ||
""" | ||
|