spaCy - Util.get_data_path



This function is used to get path to the data directory where spaCy looks for models. The default path is spacy/data. The output of this function would be a Data Path or none.

Argument

The table below explains its argument −

NAME TYPE DESCRIPTION
require_exists bool It will return path if it exists, otherwise it will return None.

Example

An example for util.get_data_path() function is stated below −

import spacy
spacy.util.get_data_path()

Output

WindowsPath('C:/Users/Leekha/Anaconda3/lib/site-packages/spacy/data')
spacy_util_get_data_path.htm
Advertisements