Kyubyong / g2pC

g2pC: A Context-aware Grapheme-to-Phoneme Conversion module for Chinese
Apache License 2.0
235 stars 30 forks source link

error about not found postag/featureIndex.txt_0 #6

Open hanyaqian opened 5 years ago

hanyaqian commented 5 years ago

FileNotFoundError when use g2p , can you give me some suggesion? thanks!

>>> g2p = G2pC()
WARNING: features.pkl does not exist, try loading features.json
WARNING: features.json does not exist, try loading using old format
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/ssd1/exec/hanyaqian/script/venv3/lib64/python3.6/site-packages/g2pc/g2pc.py", line 171, in __init__
    self.seg = pkuseg.pkuseg(postag=True)
  File "/ssd1/exec/hanyaqian/script/venv3/lib64/python3.6/site-packages/pkuseg/__init__.py", line 257, in __init__
    self.tagger = Postag(postag_dir)
  File "/ssd1/exec/hanyaqian/script/venv3/lib64/python3.6/site-packages/pkuseg/postag/__init__.py", line 16, in __init__
    self.feature_extractor = FeatureExtractor.load(modelDir)
  File "pkuseg/postag/feature_extractor.pyx", line 318, in pkuseg.postag.feature_extractor.FeatureExtractor.load
FileNotFoundError: [Errno 2] No such file or directory: '/home/hanyaqian/.pkuseg/postag/featureIndex.txt_0'
>>> 
Maxxiey commented 3 years ago

same problem, any suggestions?