mirror of
https://github.com/explosion/spaCy.git
synced 2025-01-26 09:14:32 +03:00
Adjust message [ci skip]
This commit is contained in:
parent
4cf73d85bc
commit
2d0c0134bc
|
@ -206,7 +206,7 @@ class ChineseTokenizer(DummyTokenizer):
|
||||||
import spacy_pkuseg
|
import spacy_pkuseg
|
||||||
except ImportError:
|
except ImportError:
|
||||||
raise ImportError(
|
raise ImportError(
|
||||||
"spacy_pkuseg not installed. To use this model, "
|
"spacy-pkuseg not installed. To use this model, "
|
||||||
+ _PKUSEG_INSTALL_MSG
|
+ _PKUSEG_INSTALL_MSG
|
||||||
) from None
|
) from None
|
||||||
self.pkuseg_seg = spacy_pkuseg.pkuseg(str(tempdir))
|
self.pkuseg_seg = spacy_pkuseg.pkuseg(str(tempdir))
|
||||||
|
@ -256,7 +256,7 @@ class ChineseTokenizer(DummyTokenizer):
|
||||||
except ImportError:
|
except ImportError:
|
||||||
if self.segmenter == Segmenter.pkuseg:
|
if self.segmenter == Segmenter.pkuseg:
|
||||||
raise ImportError(
|
raise ImportError(
|
||||||
"spacy_pkuseg not installed. To use this model, "
|
"spacy-pkuseg not installed. To use this model, "
|
||||||
+ _PKUSEG_INSTALL_MSG
|
+ _PKUSEG_INSTALL_MSG
|
||||||
) from None
|
) from None
|
||||||
if path.exists():
|
if path.exists():
|
||||||
|
@ -317,7 +317,7 @@ def try_pkuseg_import(pkuseg_model: str, pkuseg_user_dict: str) -> None:
|
||||||
import spacy_pkuseg
|
import spacy_pkuseg
|
||||||
|
|
||||||
except ImportError:
|
except ImportError:
|
||||||
msg = "spacy_pkuseg not installed. To use pkuseg, " + _PKUSEG_INSTALL_MSG
|
msg = "spacy-pkuseg not installed. To use pkuseg, " + _PKUSEG_INSTALL_MSG
|
||||||
raise ImportError(msg) from None
|
raise ImportError(msg) from None
|
||||||
try:
|
try:
|
||||||
return spacy_pkuseg.pkuseg(pkuseg_model, pkuseg_user_dict)
|
return spacy_pkuseg.pkuseg(pkuseg_model, pkuseg_user_dict)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user