Skip to content

Quickstart#

HuSpaCy is fully compatible with spaCy's API, newcomers can easily get started with spaCy 101 guide.

Although HuSpacy models can be loaded with spacy.load(...), the tool provides convenience methods to easily access downloaded models.

# Load the model using spacy.load(...)
import spacy
nlp = spacy.load("hu_core_news_lg")
# Load the default large model (if downloaded)
import huspacy
nlp = huspacy.load()
# Load the model directly as a module
import hu_core_news_lg
nlp = hu_core_news_lg.load()

To process texts, you can simply call the loaded model (i.e. the nlp callable object)

doc = nlp("Csiribiri csiribiri zabszalma - négy csillag közt alszom ma.")

As HuSpaCy is built on spaCy, the returned doc document contains all the annotations given by the pipeline components.


Last update: January 3, 2024