目前我正在尝试用spacyNightly训练一个NLP模型。在spacyNightly网站上,我在快速启动的帮助下创建了一个config_base.cfg。
在命令行上,我试图用以下代码自动填充它:
python -m spacy init fill-config base.cfg config.cfg --diff
运行后,我收到此错误:
Traceback (most recent call last):
File "C:UsersElske nijhof.condaenvsSpaCyNightlyenvlibrunpy.py", line 188, in _run_module_as_main
mod_name, mod_spec, code = _get_module_details(mod_name, _Error)
File "C:UsersElske nijhof.condaenvsSpaCyNightlyenvlibrunpy.py", line 147, in _get_module_details
return _get_module_details(pkg_main_name, error)
File "C:UsersElske nijhof.condaenvsSpaCyNightlyenvlibrunpy.py", line 111, in _get_module_details
__import__(pkg_name)
File "C:UsersElske nijhof.condaenvsSpaCyNightlyenvlibsite-packagesspacy__init__.py", line 13, in <module>
from . import pipeline # noqa: F401
File "C:UsersElske nijhof.condaenvsSpaCyNightlyenvlibsite-packagesspacypipeline__init__.py", line 1, in <module>
from .attributeruler import AttributeRuler
File "C:UsersElske nijhof.condaenvsSpaCyNightlyenvlibsite-packagesspacypipelineattributeruler.py", line 6, in <module>
from .pipe import Pipe
File "spacy\pipeline\pipe.pyx", line 8, in init spacy.pipeline.pipe
File "C:UsersElske nijhof.condaenvsSpaCyNightlyenvlibsite-packagesspacytraining__init__.py", line 1, in <module>
from .corpus import Corpus # noqa: F401
File "C:UsersElske nijhof.condaenvsSpaCyNightlyenvlibsite-packagesspacytrainingcorpus.py", line 8, in <module>
from .augment import dont_augment
File "C:UsersElske nijhof.condaenvsSpaCyNightlyenvlibsite-packagesspacytrainingaugment.py", line 10, in <module>
from .example import Example
File "spacy\training\example.pyx", line 10, in init spacy.training.example
File "C:UsersElske nijhof.condaenvsSpaCyNightlyenvlibsite-packagesspacytrainingalign.py", line 5, in <module>
import tokenizations
File "C:UsersElske nijhof.condaenvsSpaCyNightlyenvlibsite-packagestokenizations__init__.py", line 2, in <module>
from .tokenizations import (
ModuleNotFoundError: No module named 'tokenizations.tokenizations'
我在一个新环境中安装了spacyNightly,安装看起来很好。
有人能帮我解决这个问题吗?
您需要安装pytokenifications。
pip install pytokenizations