neelguha / simple-wikidata-db Goto Github PK
View Code? Open in Web Editor NEWA set of Python scripts for preprocessing the Wikidata JSON dump and running simple queries in an efficient manner.
A set of Python scripts for preprocessing the Wikidata JSON dump and running simple queries in an efficient manner.
Hi,
Thanks for the great project! I've noticed that in the extracted JSONL files, there is no name for 'property_id'. Could you please provide some guidance or suggestions on how to accurately extract the name of 'property_id'? Any help would be greatly appreciated!
Hi,
Thank you for the useful github code.
When I run the code in preprocess_dump.py to process the lastest wikidata dump (as of April 16) with 28 processes, I got the following error with processes 28. However, the code seems still running and produce processed tables.
Do you know if the error is something I should care about or I can just ignore it?
Thank you a lot!
Process Process-28: Traceback (most recent call last): File "**/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap self.run() File "**/lib/python3.8/multiprocessing/process.py", line 108, in run self._target(*self._args, **self._kwargs) File "**/simple-wikidata-db/simple_wikidata_db/preprocess_utils/worker_process.py", line 151, in process_data out_queue.put(process_json(ujson.loads(json_obj), language_id)) File "**/simple-wikidata-db/simple_wikidata_db/preprocess_utils/worker_process.py", line 91, in process_json datatype = claim['mainsnak']['datatype'] KeyError: 'datatype'
Hi! Great project. I've been trying to extract the links to Wikipedias, and am guessing that this info should be in the wikipedia_links files, but is missing.
According to this example, WikiBase JSON, there should be info such as:
{
"sitelinks": {
"afwiki": {
"site": "afwiki",
"title": "New York Stad",
"badges": []
},
"frwiki": {
"site": "frwiki",
"title": "New York City",
"badges": []
},
"nlwiki": {
"site": "nlwiki",
"title": "New York City",
"badges": [
"Q17437796"
]
}
}
This info is displayed in the Wikipedia
section of a WikiData page.
However, the wikipedia_links
files only contain this data:
qid: the QID of the entity
wiki_title: link to corresponding wikipedia entity
Ex:
{"qid":"Q23","wiki_title":"George Washington"}
So, there is no reference to the language of the wikipedia.
Is there any chance of Wikipedia sitelinks getting added to a future version?
Hi @neelguha! this is neat. It is close to the concerns of some in the Wikidata community around "subsetting", so I've linked it from the Tools section in https://www.wikidata.org/wiki/Wikidata:WikiProject_Schemas/Subsetting#Tools_and_Data
One of the reasons folk are interested in Wikidata subsets is that it can be too large a dataset to work with comfortably - so pulling out just the bits most relevant to some application is appealing. There's also a concern to encourage offsite usage of the data so that the load on query.wikidata.org remains manageable while the project and datasets grow. In both cases, tools like yours seem relevant, although the problem of characterising what goes in the subset can be tricky.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.