diff --git a/website/docs/api/top-level.md b/website/docs/api/top-level.md index 43f075b53..ff125d2eb 100644 --- a/website/docs/api/top-level.md +++ b/website/docs/api/top-level.md @@ -351,6 +351,24 @@ the two-letter language code. | `name` | unicode | Two-letter language code, e.g. `'en'`. | | `cls` | `Language` | The language class, e.g. `English`. | +### util.lang_class_is_loaded (#util.lang_class_is_loaded tag="function" new="2.1") + +Check whether a `Language` class is already loaded. `Language` classes are +loaded lazily, to avoid expensive setup code associated with the language data. + +> #### Example +> +> ```python +> lang_cls = util.get_lang_class("en") +> assert util.lang_class_is_loaded("en") is True +> assert util.lang_class_is_loaded("de") is False +> ``` + +| Name | Type | Description | +| ----------- | ------- | -------------------------------------- | +| `name` | unicode | Two-letter language code, e.g. `'en'`. | +| **RETURNS** | bool | Whether the class has been loaded. | + ### util.load_model {#util.load_model tag="function" new="2"} Load a model from a shortcut link, package or data path. If called with a diff --git a/website/docs/api/vocab.md b/website/docs/api/vocab.md index 64e153331..cd21a91d6 100644 --- a/website/docs/api/vocab.md +++ b/website/docs/api/vocab.md @@ -288,11 +288,12 @@ Load state from a binary string. > assert type(PERSON) == int > ``` -| Name | Type | Description | -| ------------------------------------ | ------------- | --------------------------------------------- | -| `strings` | `StringStore` | A table managing the string-to-int mapping. | -| `vectors` 2 | `Vectors` | A table associating word IDs to word vectors. | -| `vectors_length` | int | Number of dimensions for each word vector. | +| Name | Type | Description | +| --------------------------------------------- | ------------- | ------------------------------------------------------------ | +| `strings` | `StringStore` | A table managing the string-to-int mapping. | +| `vectors` 2 | `Vectors` | A table associating word IDs to word vectors. | +| `vectors_length` | int | Number of dimensions for each word vector. | +| `writing_system` 2.1 | dict | A dict with information about the language's writing system. | ## Serialization fields {#serialization-fields}