mirror of https://github.com/explosion/spaCy.git
Support vocab arg in spacy.blank
This commit is contained in:
parent
99549a5ace
commit
eff9406718
|
@ -18,6 +18,7 @@ from .util import registry, logger # noqa: F401
|
||||||
|
|
||||||
from .errors import Errors
|
from .errors import Errors
|
||||||
from .language import Language
|
from .language import Language
|
||||||
|
from .vocab import Vocab
|
||||||
from . import util
|
from . import util
|
||||||
|
|
||||||
|
|
||||||
|
@ -49,12 +50,14 @@ def load(
|
||||||
def blank(
|
def blank(
|
||||||
name: str,
|
name: str,
|
||||||
*,
|
*,
|
||||||
|
vocab: Union[Vocab, bool] = True,
|
||||||
config: Union[Dict[str, Any], Config] = util.SimpleFrozenDict(),
|
config: Union[Dict[str, Any], Config] = util.SimpleFrozenDict(),
|
||||||
meta: Dict[str, Any] = util.SimpleFrozenDict()
|
meta: Dict[str, Any] = util.SimpleFrozenDict()
|
||||||
) -> Language:
|
) -> Language:
|
||||||
"""Create a blank nlp object for a given language code.
|
"""Create a blank nlp object for a given language code.
|
||||||
|
|
||||||
name (str): The language code, e.g. "en".
|
name (str): The language code, e.g. "en".
|
||||||
|
vocab (Vocab): A Vocab object. If True, a vocab is created.
|
||||||
config (Dict[str, Any] / Config): Optional config overrides.
|
config (Dict[str, Any] / Config): Optional config overrides.
|
||||||
meta (Dict[str, Any]): Overrides for nlp.meta.
|
meta (Dict[str, Any]): Overrides for nlp.meta.
|
||||||
RETURNS (Language): The nlp object.
|
RETURNS (Language): The nlp object.
|
||||||
|
|
Loading…
Reference in New Issue