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.
 
 
Mihael Šinkec f75a6a6a9f
Docker + GPUs.
2 years ago
.gitignore Initial setup 2 years ago
Dockerfile Initial setup 2 years ago
Dockerfile.gpu Docker + GPUs. 2 years ago
LICENSE Initial commit 2 years ago
README.md Initial setup 2 years ago
app.py Cleaning code2 2 years ago
docker-compose.yml Docker + GPUs. 2 years ago
requirements.txt Initial setup 2 years 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