Go to file
2022-01-14 10:17:01 +01:00
.gitignore Initial setup 2022-01-14 09:42:34 +01:00
app.py Cleaning code2 2022-01-14 10:17:01 +01:00
Dockerfile Initial setup 2022-01-14 09:42:34 +01:00
LICENSE Initial commit 2021-12-01 07:58:09 +00:00
README.md Initial setup 2022-01-14 09:42:34 +01:00
requirements.txt Initial setup 2022-01-14 09:42:34 +01:00

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