forked from lkrsnik/classla-api
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
1 year ago | |
---|---|---|
.gitignore | 1 year ago | |
Dockerfile | 1 year ago | |
LICENSE | 2 years ago | |
README.md | 1 year ago | |
app.py | 1 year ago | |
requirements.txt | 1 year ago |
README.md
classla-api
Description
This tool uses classla library as an API. It allows for calls on some preset classla settings, as well as a custom one.
Standard UD
Preset classla settings:
{
"lang": "sl",
"pos_lemma_pretag": false
}
Usage example:
curl -X POST -d '{"text": "France Prešeren je rojen v Vrbi."}' http://127.0.0.1:5000/standard-ud
Standard JOS
Preset classla settings:
{
"lang": "sl",
"pos_use_lexicon": true,
"type": "standard_jos"
}
Usage example:
curl -X POST -d '{"text": "France Prešeren je rojen v Vrbi."}' http://127.0.0.1:5000/standard-jos
Nonstandard UD
Preset classla settings:
{
"lang": "sl",
"pos_use_lexicon": true,
"type": "nonstandard_jos"
}
Usage example:
curl -X POST -d '{"text": "kva smo mi zurali zadnje leto v zagrebu..."}' http://127.0.0.1:5000/nonstandard-ud
Nonstandard JOS
Preset classla settings:
{
"lang": "sl",
"pos_use_lexicon": true,
"processors": {
"tokenize": "nonstandard",
"lemma": "nonstandard",
"pos": "nonstandard",
"depparse": "standard_jos",
"ner": "nonstandard"
}
}
Usage example:
curl -X POST -d '{"text": "kva smo mi zurali zadnje leto v zagrebu..."}' http://127.0.0.1:5000/nonstandard-jos
Custom settings
Custom settings may be used, however they have to be in compliance with what the library allows (you can check this on https://github.com/clarinsi/classla)
###Warning: Usage of custom settings is a slow action! It may take more than 30s to get a result!
Usage example:
curl -X POST -d '{"text": "France Prešeren je rojen v Vrbi.", "settings": {"lang": "sl", "pos_lemma_pretag": false}}' http://127.0.0.1:5000/custom-settings