explosion / spacy-stanza

💥 Use the latest Stanza (StanfordNLP) research models directly in spaCy
MIT License
723 stars 59 forks source link

how to enable resource.json from local path when spacy_stanza.load_pipeline #87

Closed aaronysl closed 1 year ago

aaronysl commented 1 year ago

Hi all, I am using this line to load zh from mylocal path, but it still need to download resource.json from server:

spacy_stanza.load_pipeline("zh", download_path="/Users/cicitan/stanza_resources/zh-hans")

Downloading https://raw.githubusercontent.com/stanfordnlp/stanza-resources/main/resources_1.4.1.json: 193kB [00:00, 444kB/s]

How to make it (resources_1.4.1.json)downloaded from my local path?

polm commented 1 year ago

The download_path is for the model data, but resources.json is different data - it checks if the model or anything has been updated. So it's normal that download_path doesn't change that behavior.

When I use load_pipeline, I get a message like this:

INFO: Checking for updates to resources.json in case models have been updated.  Note: this behavior can be turned off with download_method=None or download_method=DownloadMethod.REUSE_RESOURCES

Do you not get a message like that? Have you tried specifying download_method?

polm commented 1 year ago

Closing due to lack of response, but if you have more information please feel free to follow up.