tensorflow version: ‘2.3.0’
hanlp version: ‘2.0.0-alpha.66’
import hanlp
fasttext = hanlp.pretrained.pos.CTB5_POS_RNN_FASTTEXT_ZH
tagger = hanlp.load(fasttext)
出错:
tagger = hanlp.load
(hanlp.pretrained.pos.CTB5_POS_RNN_FASTTEXT_ZH)...
Failed to load https://file.hankcs.com/hanlp/pos/ctb5_pos_rnn_fasttext_20191230_202639.zip. See traceback below:
================================ERROR LOG BEGINS================================
Traceback (most recent call last):
File "/home/mgv/anaconda3/lib/python3.6/site-packages/hanlp/utils/component_util.py", line 48, in load_from_meta_file
obj.load(save_dir, **load_kwargs)
File "/home/mgv/anaconda3/lib/python3.6/site-packages/hanlp/common/component.py", line 244, in load
self.build(**merge_dict(self.config, training=False, logger=logger, **kwargs, overwrite=True, inplace=True))
File "/home/mgv/anaconda3/lib/python3.6/site-packages/hanlp/common/component.py", line 255, in build
loss=kwargs.get('loss', None)))
File "/home/mgv/anaconda3/lib/python3.6/site-packages/hanlp/components/taggers/rnn_tagger.py", line 34, in build_model
embeddings = build_embedding(embeddings, self.transform.word_vocab, self.transform)
File "/home/mgv/anaconda3/lib/python3.6/site-packages/hanlp/layers/embeddings/__init__.py", line 33, in build_embedding
from hanlp.layers.embeddings.fast_text import FastTextEmbedding
File "/home/mgv/anaconda3/lib/python3.6/site-packages/hanlp/layers/embeddings/fast_text.py", line 7, in <module>
import fasttext
ModuleNotFoundError: No module named 'fasttext'
=================================ERROR LOG ENDS=================================
Some modules required by this model are missing. Please install the full version:
pip install hanlp[full]
If the problem still persists, please submit an issue to https://github.com/hankcs/HanLP/issues
When reporting an issue, make sure to paste the FULL ERROR LOG above.
An exception has occurred, use %tb to see the full traceback.
SystemExit: 1
利用Fasttext调包直接出错,问题