'How to get up and running with spaCy for Vietnamese?

I success with English

python -m spacy download en_core_web_lg
python -m spacy download en_core_web_sm

python -m spacy download en

I read https://spacy.io/models/xx . How to use with Vietnamese use xx?



Solution 1:[1]

Call Python terminal from Anaconda Navigator.

python -m spacy download xx_sent_ud_sm

or

python -m spacy download xx_ent_wiki_sm

test

import spacy
from spacy import displacy

nlp = spacy.load("xx_sent_ud_sm")
doc = nlp("Hôm nay tr?i n?ng to")
displacy.serve(doc, style="dep")

or

import spacy
from spacy import displacy

nlp = spacy.load("xx_ent_wiki_sm")
doc = nlp("Hôm nay tr?i n?ng to")
displacy.serve(doc, style="ent")

result [1]: https://i.stack.imgur.com/OjTqJ.png

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1