-
-
Notifications
You must be signed in to change notification settings - Fork 7
Models
Mika Hämäläinen edited this page Feb 1, 2018
·
9 revisions
UralicNLP can currently use three different kinds of models: HFST morphological generator, HFST morphological analyser and constraint grammar disambiguator. The HFST models are available for all the supported languages, while the CGs are limited to only a few languages.
from uralicNLP import uralicApi
uralicApi.download("fin")
The above snippet downloads all the models for Finnish. Run with sudo privileges for a system wide installation.
from uralicNLP import uralicApi
print uralicApi.__model_base_folders()
Gives you the list of the possible locations for the models. If you want to create your own models, just create a subdirectory in any of these locations by the three letter language code of your language. Name your models as generator, analyser and cg without file extensions.
UralicNLP is an open-source Python library by Mika Hämäläinen