format_data.py

View code on Github

Formats the data queried from Wikidata using query_verbs.sparql.

scribe_data.wikidata.format_data.format_data(dir_path: str, language: str, data_type: str)[source]

Format data queried from the Wikidata Query Service.

Parameters:
dir_pathstr

The output directory path for results.

languagestr

The language for which the data is being loaded.

data_typestr

The type of data being loaded (e.g. ‘nouns’, ‘verbs’).

Returns:
None

Saves and formatted data file for the given language and data type.