- spaCy Tutorial
- spaCy - Home
- spaCy - Introduction
- spaCy - Getting Started
- spaCy - Models and Languages
- spaCy - Architecture
- spaCy - Command Line Helpers
- spaCy - Top-level Functions
- spaCy - Visualization Function
- spaCy - Utility Functions
- spaCy - Compatibility Functions
- spaCy - Containers
- Doc Class ContextManager and Property
- spaCy - Container Token Class
- spaCy - Token Properties
- spaCy - Container Span Class
- spaCy - Span Class Properties
- spaCy - Container Lexeme Class
- Training Neural Network Model
- Updating Neural Network Model
- spaCy Useful Resources
- spaCy - Quick Guide
- spaCy - Useful Resources
- spaCy - Discussion
spaCy - Util.set_lang_class
As name implies, with the help of this function you can set a custom Language class name that can later be loaded via util.get_lang_class function.
Arguments
The table below explains its arguments −
NAME | TYPE | DESCRIPTION |
---|---|---|
name | unicode | It represents the two-letter language code. For example, ‘en’ for English. |
cls | Language | It represents the language class. For example, ‘English’. |
Example
An example for util.set_lang_class() function is as follows −
from spacy.lang.en import English spacy.util.set_lang_class('en', English) lang_class = spacy.util.get_lang_class('en') lang_class
Output
The output is stated below −
spacy.lang.en.English
spacy_util_get_data_path.htm
Advertisements
To Continue Learning Please Login
Login with Google