_sentencepiece.SentencePieceProcessor_LoadFromFile No such file or directory

386 Views Asked by At

I'm trying to run script of deepparse NN.

But got this mistake.

_sentencepiece.SentencePieceProcessor_LoadFromFile(self, arg)
OSError: Not found: "C:\Users\MyUserName\.cache\deepparse\multi\multi.wiki.bpe.vs100000.model": No such file or directory

This is the code that i run. From https://deepparse.org/

from deepparse.parser import AddressParser
from deepparse.dataset_container import CSVDatasetContainer

address_parser = AddressParser(model_type="bpemb", device=0)

parsed_address = address_parser(
    ["350 rue des Lilas Ouest Québec Québec G1L 1B6", "777 Brockton Avenue, Abington MA 2351",
     "Ansgarstr. 4, Wallenhorst, 49134", "221 B Baker Street", "서울특별시 종로구 사직로3길 23"])
print(parsed_address)

The problem is not about file location. This file exist. I dived a bit in the deepparse library and have tried to change path to: "C:\\Users\\MyUserName\\.cache\\deepparse\\" or "C:/Users/MyUserName/.cache/deepparse/" But it's not the problem with path.

I did little research so i think problem occur with torch.save() or torch.load().But I'm new to NN, so can't understand how to fix it. https://github.com/flairNLP/flair/issues/1747

P.S. also my fasttext installed from a wheel file. "fasttext-0.9.2-cp310-cp310-win_amd64.whl" I have. Python 3.10 Windows 10

0

There are 0 best solutions below