Added two more async endpoints (temporary implementation)

This commit is contained in:
Kikimanox
2022-09-01 18:30:58 +02:00
parent fcf192b00b
commit 729dfb14cf
8 changed files with 589 additions and 264 deletions
+78
View File
@@ -87,6 +87,84 @@
} }
} }
}, },
"/pretvoriDatotekoInOznaciAsync": {
"post": {
"tags": [
"marktext"
],
"summary": "Pretvori datoteko v besedilo in označi s classlo/stanzo z uporabo slovenskih modelov ter vrne conll-u format",
"operationId": "getTextFromFile",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"required": [
"file"
],
"type": "object",
"properties": {
"file": {
"type": "string",
"format": "binary"
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/pretvoriDatotekoInOznaciAsync/ocr": {
"post": {
"tags": [
"marktext"
],
"summary": "Pretvori datoteko v besedilo s pomočjo ocr razpoznavanja in označi s classlo/stanzo z uporabo slovenskih modelov ter vrne conll-u format",
"operationId": "getTextFromFileOcr",
"requestBody": {
"content": {
"multipart/form-data": {
"schema": {
"required": [
"file"
],
"type": "object",
"properties": {
"file": {
"type": "string",
"format": "binary"
}
}
}
}
}
},
"responses": {
"200": {
"description": "OK",
"content": {
"*/*": {
"schema": {
"type": "string"
}
}
}
}
}
}
},
"/izlusci": { "/izlusci": {
"post": { "post": {
"tags": [ "tags": [
@@ -24,7 +24,7 @@ tika_server = "http://tika2:9999/tika_NAROBENURLZANALASC"
# tika_server = "http://rsdo.lhrs.feri.um.si:9998/tika" # tika_server = "http://rsdo.lhrs.feri.um.si:9998/tika"
def extract_text(file): def extract_text_prepResp(file):
if tika_responding(): if tika_responding():
response = requests.put(tika_server, data=file) response = requests.put(tika_server, data=file)
return response.text, 200 return response.text, 200
@@ -47,7 +47,7 @@ def extract_text(file):
return content, 200 return content, 200
def ocr_text(file): def ocr_text_prepResp(file):
if tika_responding(): if tika_responding():
response = requests.put(tika_server, data=file, response = requests.put(tika_server, data=file,
headers={"X-Tika-PDFOcrStrategy": "ocr_only", "X-Tika-OCRLanguage": "slv+eng"}) headers={"X-Tika-PDFOcrStrategy": "ocr_only", "X-Tika-OCRLanguage": "slv+eng"})
@@ -87,7 +87,7 @@ def datoteka_v_besedilo_post(file=None): # noqa: E501
if file is None: if file is None:
return "No file provided", 400 return "No file provided", 400
try: try:
return extract_text(file) return extract_text_prepResp(file)
except Exception as e: except Exception as e:
return str(e), 500 return str(e), 500
@@ -105,7 +105,7 @@ def get_text_ocr(file=None): # noqa: E501
if file is None: if file is None:
return "No file provided", 400 return "No file provided", 400
try: try:
return ocr_text(file) return ocr_text_prepResp(file)
except Exception as e: except Exception as e:
return str(e), 500 return str(e), 500
@@ -125,7 +125,7 @@ def datoteka_v_besedilo_in_classla(file=None): # noqa: E501
if file is None: if file is None:
return "No file provided", 400 return "No file provided", 400
try: try:
txt, _ = extract_text(file) txt, _ = extract_text_prepResp(file)
return cl_utils.raw_text_to_conllu(txt) return cl_utils.raw_text_to_conllu(txt)
except Exception as e: except Exception as e:
return str(e), 500 return str(e), 500
@@ -151,7 +151,7 @@ def get_conllu_ocr(file=None): # noqa: E501
headers={"X-Tika-PDFOcrStrategy": "ocr_only", "X-Tika-OCRLanguage": "slv+eng"}) headers={"X-Tika-PDFOcrStrategy": "ocr_only", "X-Tika-OCRLanguage": "slv+eng"})
return cl_utils.raw_text_to_conllu(response.text) return cl_utils.raw_text_to_conllu(response.text)
else: else:
txt, _ = ocr_text(file) txt, _ = ocr_text_prepResp(file)
return cl_utils.raw_text_to_conllu(txt) return cl_utils.raw_text_to_conllu(txt)
except Exception as e: except Exception as e:
return str(e), 500 return str(e), 500
@@ -5,6 +5,7 @@ from swagger_server.models.oznaci_besedilo_async_body import OznaciBesediloAsync
from swagger_server import util from swagger_server import util
from swagger_server.classla import cl_utils from swagger_server.classla import cl_utils
from swagger_server.requets_db.models.vrsta import (Job, JobManager) from swagger_server.requets_db.models.vrsta import (Job, JobManager)
import swagger_server.controllers.doc2text_controller as d2t
def get_text(body): # noqa: E501 def get_text(body): # noqa: E501
@@ -26,4 +27,56 @@ def get_text(body): # noqa: E501
return "Something went wrong", 500 return "Something went wrong", 500
ret = {'check_job_url': f'{connexion.request.url_root}/job/{job.id}'} ret = {'check_job_url': f'{connexion.request.url_root}/job/{job.id}'}
return ret # Todo: Update swagger to the newest response template later return ret, 200 # Todo: Update swagger to the newest response template later
def get_text_from_file(file=None): # noqa: E501
"""Pretvori datoteko v besedilo in označi s classlo/stanzo z uporabo slovenskih modelov ter vrne conll-u format
# noqa: E501
:param file:
:type file: strstr
:rtype: str
"""
if file is None:
return "No file provided", 400
txt, status = d2t.extract_text_prepResp(file)
# Todo: instead of parsing text here, instead save the file into the tb or locally, and then parsing
# Todo: when the job actually executes (this version of the implementation is temporary)
if status == 200:
job, is_old_job = JobManager.create_job(1, txt)
if job is None:
return "Something went wrong", 500
ret = {'check_job_url': f'{connexion.request.url_root}/job/{job.id}'}
return ret, 200
else:
return "Something went wrong", 500
def get_text_from_file_ocr(file=None): # noqa: E501
"""Pretvori datoteko v besedilo s pomočjo ocr razpoznavanja in označi s classlo/stanzo z uporabo slovenskih modelov ter vrne conll-u format
# noqa: E501
:param file:
:type file: strstr
:rtype: str
"""
if file is None:
return "No file provided", 400
txt, status = d2t.ocr_text_prepResp(file)
# Todo: instead of ocr-ing text here, instead save the file into the tb or locally, and then ocr
# Todo: when the job actually executes (this version of the implementation is temporary)
if status == 200:
job, is_old_job = JobManager.create_job(1, txt)
if job is None:
return "Something went wrong", 500
ret = {'check_job_url': f'{connexion.request.url_root}/job/{job.id}'}
return ret, 200
else:
return "Something went wrong", 500
+2
View File
@@ -11,3 +11,5 @@ from swagger_server.models.datoteka_v_besedilo_body import DatotekaVBesediloBody
from swagger_server.models.datoteka_v_besedilo_ocr_body import DatotekaVBesediloOcrBody from swagger_server.models.datoteka_v_besedilo_ocr_body import DatotekaVBesediloOcrBody
from swagger_server.models.datoteka_v_conllu_sync_body import DatotekaVConlluSyncBody from swagger_server.models.datoteka_v_conllu_sync_body import DatotekaVConlluSyncBody
from swagger_server.models.datoteka_v_conllu_sync_ocr_body import DatotekaVConlluSyncOcrBody from swagger_server.models.datoteka_v_conllu_sync_ocr_body import DatotekaVConlluSyncOcrBody
from swagger_server.models.pretvori_datoteko_in_oznaci_async_body import PretvoriDatotekoInOznaciAsyncBody
from swagger_server.models.pretvori_datoteko_in_oznaci_async_ocr_body import PretvoriDatotekoInOznaciAsyncOcrBody
@@ -0,0 +1,64 @@
# coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from swagger_server.models.base_model_ import Model
from swagger_server import util
class PretvoriDatotekoInOznaciAsyncBody(Model):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self, file: str=None): # noqa: E501
"""PretvoriDatotekoInOznaciAsyncBody - a model defined in Swagger
:param file: The file of this PretvoriDatotekoInOznaciAsyncBody. # noqa: E501
:type file: str
"""
self.swagger_types = {
'file': str
}
self.attribute_map = {
'file': 'file'
}
self._file = file
@classmethod
def from_dict(cls, dikt) -> 'PretvoriDatotekoInOznaciAsyncBody':
"""Returns the dict as a model
:param dikt: A dict.
:type: dict
:return: The pretvoriDatotekoInOznaciAsync_body of this PretvoriDatotekoInOznaciAsyncBody. # noqa: E501
:rtype: PretvoriDatotekoInOznaciAsyncBody
"""
return util.deserialize_model(dikt, cls)
@property
def file(self) -> str:
"""Gets the file of this PretvoriDatotekoInOznaciAsyncBody.
:return: The file of this PretvoriDatotekoInOznaciAsyncBody.
:rtype: str
"""
return self._file
@file.setter
def file(self, file: str):
"""Sets the file of this PretvoriDatotekoInOznaciAsyncBody.
:param file: The file of this PretvoriDatotekoInOznaciAsyncBody.
:type file: str
"""
if file is None:
raise ValueError("Invalid value for `file`, must not be `None`") # noqa: E501
self._file = file
@@ -0,0 +1,64 @@
# coding: utf-8
from __future__ import absolute_import
from datetime import date, datetime # noqa: F401
from typing import List, Dict # noqa: F401
from swagger_server.models.base_model_ import Model
from swagger_server import util
class PretvoriDatotekoInOznaciAsyncOcrBody(Model):
"""NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self, file: str=None): # noqa: E501
"""PretvoriDatotekoInOznaciAsyncOcrBody - a model defined in Swagger
:param file: The file of this PretvoriDatotekoInOznaciAsyncOcrBody. # noqa: E501
:type file: str
"""
self.swagger_types = {
'file': str
}
self.attribute_map = {
'file': 'file'
}
self._file = file
@classmethod
def from_dict(cls, dikt) -> 'PretvoriDatotekoInOznaciAsyncOcrBody':
"""Returns the dict as a model
:param dikt: A dict.
:type: dict
:return: The pretvoriDatotekoInOznaciAsync_ocr_body of this PretvoriDatotekoInOznaciAsyncOcrBody. # noqa: E501
:rtype: PretvoriDatotekoInOznaciAsyncOcrBody
"""
return util.deserialize_model(dikt, cls)
@property
def file(self) -> str:
"""Gets the file of this PretvoriDatotekoInOznaciAsyncOcrBody.
:return: The file of this PretvoriDatotekoInOznaciAsyncOcrBody.
:rtype: str
"""
return self._file
@file.setter
def file(self, file: str):
"""Sets the file of this PretvoriDatotekoInOznaciAsyncOcrBody.
:param file: The file of this PretvoriDatotekoInOznaciAsyncOcrBody.
:type file: str
"""
if file is None:
raise ValueError("Invalid value for `file`, must not be `None`") # noqa: E501
self._file = file
@@ -45,6 +45,12 @@ class JobManager:
@staticmethod @staticmethod
def create_job(job_type, job_input) -> Tuple(Job, bool): def create_job(job_type, job_input) -> Tuple(Job, bool):
""" """
:param: job_type
:possibilities:
1 = txt to classla
2 = file to txt and then mark with classla
3 = file with ocr then to classla
:return: Job object, Did already exist boolean :return: Job object, Did already exist boolean
""" """
try: try:
+315 -257
View File
@@ -3,33 +3,33 @@ info:
title: OpenAPI definition title: OpenAPI definition
version: v0 version: v0
servers: servers:
- url: http://localhost:8089 - url: http://localhost:8089
description: Generated server url description: Generated server url
paths: paths:
/job/{job_id}: /job/{job_id}:
get: get:
tags: tags:
- jobs - jobs
summary: Vrne status summary: Vrne status
operationId: get_job_status operationId: get_job_status
parameters: parameters:
- name: job_id - name: job_id
in: path in: path
required: true required: true
style: simple style: simple
explode: false explode: false
schema: schema:
type: integer type: integer
format: int64 format: int64
- name: show_estimated_completion - name: show_estimated_completion
in: query in: query
description: Calculate estimate time remaining based on various factors (could description: Calculate estimate time remaining based on various factors (could
be inaccurate) be inaccurate)
required: false required: false
style: form style: form
explode: true explode: true
schema: schema:
type: boolean type: boolean
responses: responses:
"200": "200":
description: OK description: OK
@@ -41,7 +41,7 @@ paths:
/oznaciBesediloAsync: /oznaciBesediloAsync:
post: post:
tags: tags:
- marktext - marktext
summary: Označi besedilo s classlo/stanzo z uporabo slovenskih modelov ter vrne summary: Označi besedilo s classlo/stanzo z uporabo slovenskih modelov ter vrne
conll-u format conll-u format
operationId: get_text operationId: get_text
@@ -60,10 +60,52 @@ paths:
type: string type: string
x-content-type: '*/*' x-content-type: '*/*'
x-openapi-router-controller: swagger_server.controllers.marktext_controller x-openapi-router-controller: swagger_server.controllers.marktext_controller
/pretvoriDatotekoInOznaciAsync:
post:
tags:
- marktext
summary: Pretvori datoteko v besedilo in označi s classlo/stanzo z uporabo slovenskih
modelov ter vrne conll-u format
operationId: get_text_from_file
requestBody:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/pretvoriDatotekoInOznaciAsync_body'
responses:
"200":
description: OK
content:
'*/*':
schema:
type: string
x-content-type: '*/*'
x-openapi-router-controller: swagger_server.controllers.marktext_controller
/pretvoriDatotekoInOznaciAsync/ocr:
post:
tags:
- marktext
summary: Pretvori datoteko v besedilo s pomočjo ocr razpoznavanja in označi
s classlo/stanzo z uporabo slovenskih modelov ter vrne conll-u format
operationId: get_text_from_file_ocr
requestBody:
content:
multipart/form-data:
schema:
$ref: '#/components/schemas/pretvoriDatotekoInOznaciAsync_ocr_body'
responses:
"200":
description: OK
content:
'*/*':
schema:
type: string
x-content-type: '*/*'
x-openapi-router-controller: swagger_server.controllers.marktext_controller
/izlusci: /izlusci:
post: post:
tags: tags:
- extract - extract
summary: Izlusci terminološke kandidate iz seznama besedil v conllu obliki summary: Izlusci terminološke kandidate iz seznama besedil v conllu obliki
operationId: get_candidates operationId: get_candidates
requestBody: requestBody:
@@ -86,7 +128,7 @@ paths:
/datotekaVBesedilo: /datotekaVBesedilo:
post: post:
tags: tags:
- doc-2text - doc-2text
summary: "Pretvori datoteko formata pdf, doc, docx, ppt, xls,... vraca besedilo" summary: "Pretvori datoteko formata pdf, doc, docx, ppt, xls,... vraca besedilo"
operationId: datoteka_v_besedilo_post operationId: datoteka_v_besedilo_post
requestBody: requestBody:
@@ -106,7 +148,7 @@ paths:
/datotekaVBesedilo/ocr: /datotekaVBesedilo/ocr:
post: post:
tags: tags:
- doc-2text - doc-2text
summary: "Pretvori datoteko formata pdf, doc, docx, ppt, xls,... v besedilo\ summary: "Pretvori datoteko formata pdf, doc, docx, ppt, xls,... v besedilo\
\ s pomočjo ocr razpoznavanja" \ s pomočjo ocr razpoznavanja"
operationId: get_text_ocr operationId: get_text_ocr
@@ -127,7 +169,7 @@ paths:
/datotekaVConlluSync: /datotekaVConlluSync:
post: post:
tags: tags:
- doc-2text - doc-2text
summary: "Pretvori datoteko formata pdf, doc, docx, ppt, xls,... vraca conllu" summary: "Pretvori datoteko formata pdf, doc, docx, ppt, xls,... vraca conllu"
operationId: datoteka_v_besedilo_in_classla operationId: datoteka_v_besedilo_in_classla
requestBody: requestBody:
@@ -147,7 +189,7 @@ paths:
/datotekaVConlluSync/ocr: /datotekaVConlluSync/ocr:
post: post:
tags: tags:
- doc-2text - doc-2text
summary: "Pretvori datoteko formata pdf, doc, docx, ppt, xls,... v conllu s\ summary: "Pretvori datoteko formata pdf, doc, docx, ppt, xls,... v conllu s\
\ pomočjo ocr razpoznavanja" \ pomočjo ocr razpoznavanja"
operationId: get_conllu_ocr operationId: get_conllu_ocr
@@ -168,48 +210,48 @@ paths:
/oss/steviloBesedilPoIskanju: /oss/steviloBesedilPoIskanju:
get: get:
tags: tags:
- oss - oss
summary: Vrne število besedil glede na iskalne pogoje summary: Vrne število besedil glede na iskalne pogoje
operationId: get_number_texts operationId: get_number_texts
parameters: parameters:
- name: leta - name: leta
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: array type: array
items: items:
type: integer type: integer
format: int64 format: int64
- name: vrste - name: vrste
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: array type: array
items: items:
type: string type: string
- name: kljucnebesede - name: kljucnebesede
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: array type: array
items: items:
type: string type: string
- name: cerifpodrocja - name: cerifpodrocja
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: array type: array
items: items:
type: integer type: integer
format: int64 format: int64
responses: responses:
"200": "200":
description: OK description: OK
@@ -223,48 +265,48 @@ paths:
/oss/izlusciPoIskanju: /oss/izlusciPoIskanju:
get: get:
tags: tags:
- oss - oss
summary: 'Vrne terminloške kandidate glede na ' summary: 'Vrne terminloške kandidate glede na '
operationId: get_extracted_words operationId: get_extracted_words
parameters: parameters:
- name: leta - name: leta
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: array type: array
items: items:
type: integer type: integer
format: int64 format: int64
- name: vrste - name: vrste
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: array type: array
items: items:
type: string type: string
- name: kljucnebesede - name: kljucnebesede
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: array type: array
items: items:
type: string type: string
- name: cerifpodrocja - name: cerifpodrocja
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: array type: array
items: items:
type: integer type: integer
format: int64 format: int64
responses: responses:
"200": "200":
description: OK description: OK
@@ -279,49 +321,49 @@ paths:
/oss/datotekePoIskanju: /oss/datotekePoIskanju:
get: get:
tags: tags:
- oss - oss
summary: Vrne seznam binarnih zapisov v originalnem formatu glede na iskalne summary: Vrne seznam binarnih zapisov v originalnem formatu glede na iskalne
pogoje pogoje
operationId: get_files operationId: get_files
parameters: parameters:
- name: leta - name: leta
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: array type: array
items: items:
type: integer type: integer
format: int64 format: int64
- name: vrste - name: vrste
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: array type: array
items: items:
type: string type: string
- name: kljucnebesede - name: kljucnebesede
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: array type: array
items: items:
type: string type: string
- name: cerifpodrocja - name: cerifpodrocja
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: array type: array
items: items:
type: integer type: integer
format: int64 format: int64
responses: responses:
"200": "200":
description: OK description: OK
@@ -339,18 +381,18 @@ paths:
/oss/datotekaPoId: /oss/datotekaPoId:
get: get:
tags: tags:
- oss - oss
summary: Vrne binarni zapis v originalnem formatu po id-ju datoteke summary: Vrne binarni zapis v originalnem formatu po id-ju datoteke
operationId: get_file operationId: get_file
parameters: parameters:
- name: file_id - name: file_id
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: integer type: integer
format: int64 format: int64
responses: responses:
"200": "200":
description: OK description: OK
@@ -366,48 +408,48 @@ paths:
/oss/conlluPoIskanju: /oss/conlluPoIskanju:
get: get:
tags: tags:
- oss - oss
summary: Vrne seznam CoNNL-U-jev glede na iskalne pogoje summary: Vrne seznam CoNNL-U-jev glede na iskalne pogoje
operationId: get_conllus operationId: get_conllus
parameters: parameters:
- name: leta - name: leta
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: array type: array
items: items:
type: integer type: integer
format: int64 format: int64
- name: vrste - name: vrste
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: array type: array
items: items:
type: string type: string
- name: kljucnebesede - name: kljucnebesede
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: array type: array
items: items:
type: string type: string
- name: cerifpodrocja - name: cerifpodrocja
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: array type: array
items: items:
type: integer type: integer
format: int64 format: int64
responses: responses:
"200": "200":
description: OK description: OK
@@ -422,18 +464,18 @@ paths:
/oss/conlluPoId: /oss/conlluPoId:
get: get:
tags: tags:
- oss - oss
summary: Vrne CoNNL-U po id-ju datoteke summary: Vrne CoNNL-U po id-ju datoteke
operationId: get_conllu operationId: get_conllu
parameters: parameters:
- name: file_id - name: file_id
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: integer type: integer
format: int64 format: int64
responses: responses:
"200": "200":
description: OK description: OK
@@ -446,18 +488,18 @@ paths:
/oss/besediloPoId: /oss/besediloPoId:
get: get:
tags: tags:
- oss - oss
summary: Vrne besedilo po id-ju datoteke summary: Vrne besedilo po id-ju datoteke
operationId: oss_besedilo_po_id_get operationId: oss_besedilo_po_id_get
parameters: parameters:
- name: file_id - name: file_id
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: integer type: integer
format: int64 format: int64
responses: responses:
"200": "200":
description: OK description: OK
@@ -470,48 +512,48 @@ paths:
/oss/besedilaPoIskanju: /oss/besedilaPoIskanju:
get: get:
tags: tags:
- oss - oss
summary: Vrne seznam besedil glede na iskalne pogoje summary: Vrne seznam besedil glede na iskalne pogoje
operationId: get_texts operationId: get_texts
parameters: parameters:
- name: leta - name: leta
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: array type: array
items: items:
type: integer type: integer
format: int64 format: int64
- name: vrste - name: vrste
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: array type: array
items: items:
type: string type: string
- name: kljucnebesede - name: kljucnebesede
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: array type: array
items: items:
type: string type: string
- name: cerifpodrocja - name: cerifpodrocja
in: query in: query
required: true required: true
style: form style: form
explode: true explode: true
schema: schema:
type: array type: array
items: items:
type: integer type: integer
format: int64 format: int64
responses: responses:
"200": "200":
description: OK description: OK
@@ -549,18 +591,18 @@ components:
format: int64 format: int64
example: example:
podporneutezi: podporneutezi:
- 6.0274563 - 6.0274563
- 6.0274563 - 6.0274563
pogostostpojavljanja: pogostostpojavljanja:
- 1 - 1
- 1 - 1
POSoznake: POSoznake POSoznake: POSoznake
kanonicnaoblika: kanonicnaoblika kanonicnaoblika: kanonicnaoblika
nosilnautez: 0.8008282 nosilnautez: 0.8008282
kandidat: kandidat kandidat: kandidat
JobResponse: JobResponse:
required: required:
- finished_job - finished_job
type: object type: object
properties: properties:
finished_job: finished_job:
@@ -583,6 +625,22 @@ components:
properties: properties:
besedilo: besedilo:
type: string type: string
pretvoriDatotekoInOznaciAsync_body:
required:
- file
type: object
properties:
file:
type: string
format: binary
pretvoriDatotekoInOznaciAsync_ocr_body:
required:
- file
type: object
properties:
file:
type: string
format: binary
izlusci_body: izlusci_body:
type: object type: object
properties: properties:
@@ -596,7 +654,7 @@ components:
type: string type: string
datotekaVBesedilo_body: datotekaVBesedilo_body:
required: required:
- file - file
type: object type: object
properties: properties:
file: file:
@@ -604,7 +662,7 @@ components:
format: binary format: binary
datotekaVBesedilo_ocr_body: datotekaVBesedilo_ocr_body:
required: required:
- file - file
type: object type: object
properties: properties:
file: file:
@@ -612,7 +670,7 @@ components:
format: binary format: binary
datotekaVConlluSync_body: datotekaVConlluSync_body:
required: required:
- file - file
type: object type: object
properties: properties:
file: file:
@@ -620,7 +678,7 @@ components:
format: binary format: binary
datotekaVConlluSync_ocr_body: datotekaVConlluSync_ocr_body:
required: required:
- file - file
type: object type: object
properties: properties:
file: file: