# wikidata-filter A tool to get the human-readable labels, descriptions, and wikidata IDs from a Wikidata dump like `latest-truthy.nt.gz`, `latest-all.nt.gz`, etc. ## Installation ``` cargo install wikidata-filter ``` ## Example: Takes a big dump of WikiData like this:
N-Triples Data ```nt . . . "1.0.0" . "2019-09-09T23:00:01Z"^^ . . . . "1007238018"^^ . "2019-09-02T21:49:21Z"^^ . "320"^^ . "766"^^ . "75"^^ . . . . "it" . . "Belgio"@it . "wikivoyage" . . . "an" . . "Belchica"@an . ```
And generates a JSON document like this: ```json [ { "id": "Q23", "label": "George Washington", "description": "First President of the United States" }, { "id": "Q24", "label": "Jack Bauer", "description": "character from the television series 24" }, { "id": "Q42", "label": "Douglas Adams", "description": "British author and humorist" }, { "id": "Q31", "label": "Belgium", "description": "federal constitutional monarchy in Western Europe" }, { "id": "Q8", "label": "happiness", "description": "mental or emotional state of well-being characterized by pleasant emotions" } ] ```