spaCy - Util.get_package_path



As the name implies, this utility function is used to get the path of an installed spacy package. It is mainly used to resolve the location of spacy model packages.

Argument

The table below explains its argument −

NAME TYPE DESCRIPTION
package_name Unicode It is the name of the installed package.

Example

An example of util.get_package_path() function is as follows:

import spacy
spacy.util.get_package_path("en_core_web_sm")

Output

When you run the code, you will see the following output −

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