Hola ! Estoy intentando instalar SpaCy en francés y tengo algunos problemas. De hecho, si descargué el modelo francés con python -m spacy download fr
, no puedo solicitarlo, ya que me devuelve el siguiente mensaje de error:
OSError: [E050] Can't find model 'fr'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.
Aquí está el mensaje de error completo:
# copy-paste the error message here
(booenv) C:\Users\antoi\Documents\Programming\PACO\bookchatbot>python -m spacy download fr
Requirement already satisfied: fr_core_news_sm==2.1.0 from https://github.com/explosion/spacy-models/releases/download/fr_core_news_sm-2.1.0/fr_core_news_sm-2.1.0.tar.gz#egg=fr_core_news_sm==2.1.0 in c:\users\antoi\documents\programming\paco\bookchatbot\booenv\lib\site-packages (2.1.0)
You are using pip version 10.0.1, however version 19.1 is available.
You should consider upgrading via the 'python -m pip install --upgrade pip' command.
✔ Download and installation successful
You can now load the model via spacy.load('fr_core_news_sm')
You do not have sufficient privilege to perform this operation.
✔ Linking successful
C:\Users\antoi\Documents\Programming\PACO\bookchatbot\booenv\lib\site-packages\fr_core_news_sm
-->
C:\Users\antoi\Documents\Programming\PACO\bookchatbot\booenv\lib\site-packages\spacy\data\fr
You can now load the model via spacy.load('fr')
(booenv) C:\Users\antoi\Documents\Programming\PACO\bookchatbot>python -m rasa_nlu.train -c nlu_config.yml --data nlu.md -o models --fixed_model_name nlu --project current --verbose
C:\Python37\lib\runpy.py:125: RuntimeWarning: 'rasa_nlu.train' found in sys.modules after import of package 'rasa_nlu', but prior to execution of 'rasa_nlu.train'; this may result in unpredictable behaviour
warn(RuntimeWarning(msg))
2019-04-30 15:21:55 WARNING rasa_nlu.config - You have specified the pipeline template 'spacy_sklearn' which has been renamed to 'pretrained_embeddings_spacy'. Please update your code as it will no longer work with future versions of Rasa NLU.
2019-04-30 15:21:55 INFO rasa_nlu.utils.spacy_utils - Trying to load spacy model with name 'fr'
Traceback (most recent call last):
File "C:\Python37\lib\runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "C:\Python37\lib\runpy.py", line 85, in _run_code
exec(code, run_globals)
File "C:\Users\antoi\Documents\Programming\PACO\bookchatbot\booenv\lib\site-packages\rasa_nlu\train.py", line 173, in <module>
num_threads=cmdline_args.num_threads)
File "C:\Users\antoi\Documents\Programming\PACO\bookchatbot\booenv\lib\site-packages\rasa_nlu\train.py", line 136, in train
trainer = Trainer(nlu_config, component_builder)
File "C:\Users\antoi\Documents\Programming\PACO\bookchatbot\booenv\lib\site-packages\rasa_nlu\model.py", line 150, in __init__
self.pipeline = self._build_pipeline(cfg, component_builder)
File "C:\Users\antoi\Documents\Programming\PACO\bookchatbot\booenv\lib\site-packages\rasa_nlu\model.py", line 162, in _build_pipeline
component = component_builder.create_component(component_cfg, cfg)
File "C:\Users\antoi\Documents\Programming\PACO\bookchatbot\booenv\lib\site-packages\rasa_nlu\components.py", line 448, in create_component
component_config, cfg)
File "C:\Users\antoi\Documents\Programming\PACO\bookchatbot\booenv\lib\site-packages\rasa_nlu\registry.py", line 186, in create_component_by_config
return component_class.create(component_config, config)
File "C:\Users\antoi\Documents\Programming\PACO\bookchatbot\booenv\lib\site-packages\rasa_nlu\utils\spacy_utils.py", line 64, in create
nlp = spacy.load(spacy_model_name, disable=['parser'])
File "C:\Users\antoi\Documents\Programming\PACO\bookchatbot\booenv\lib\site-packages\spacy\__init__.py", line 27, in load
return util.load_model(name, **overrides)
File "C:\Users\antoi\Documents\Programming\PACO\bookchatbot\booenv\lib\site-packages\spacy\util.py", line 136, in load_model
raise IOError(Errors.E050.format(name=name))
OSError: [E050] Can't find model 'fr'. It doesn't seem to be a shortcut link, a Python package or a valid path to a data directory.
Cómo reproducir el problema.
Estoy haciendo esto en el caso de la implementación de este chatbot rasa. Cambié el modelo de inglés a francés modificando el nlu_config.yml archivo.
Mi entorno
- spaCy version: 2.1.3
- Platform: Windows-10-10.0.17134-SP0
- Python version: 3.7.1