Še en mini fix za boljšo čitljivost
This commit is contained in:
@@ -23,6 +23,7 @@ ATEapi_endpoint = "http://ate-api:5000/predict"
|
|||||||
def do_izlusci(conllus, prepovedane_besede,definicije=False):
|
def do_izlusci(conllus, prepovedane_besede,definicije=False):
|
||||||
tmp_file_path = ""
|
tmp_file_path = ""
|
||||||
print(definicije);
|
print(definicije);
|
||||||
|
ret = {'terminoloski_kandidati':[]}
|
||||||
try:
|
try:
|
||||||
big_conllu = cl_utils.multipla_conllus_to_one_from_conllus_arr(conllus)
|
big_conllu = cl_utils.multipla_conllus_to_one_from_conllus_arr(conllus)
|
||||||
tmp_file_path = create_random_file_in_tmp_folder(big_conllu, ".conllu")
|
tmp_file_path = create_random_file_in_tmp_folder(big_conllu, ".conllu")
|
||||||
@@ -35,8 +36,9 @@ def do_izlusci(conllus, prepovedane_besede,definicije=False):
|
|||||||
res = requests.post(ATEapi_endpoint, files=files)
|
res = requests.post(ATEapi_endpoint, files=files)
|
||||||
data = json.loads(res.text)
|
data = json.loads(res.text)
|
||||||
|
|
||||||
|
|
||||||
ret = {'terminoloski_kandidati': [
|
|
||||||
|
ret['terminoloski_kandidati']=[
|
||||||
{
|
{
|
||||||
'POSoznake': tk['term_example_pos'],
|
'POSoznake': tk['term_example_pos'],
|
||||||
'kandidat': tk['lemma'], # more to bit lemma al terms?
|
'kandidat': tk['lemma'], # more to bit lemma al terms?
|
||||||
@@ -49,7 +51,7 @@ def do_izlusci(conllus, prepovedane_besede,definicije=False):
|
|||||||
'pogostostpojavljanja': [tk['frequency'], 0] # ???????
|
'pogostostpojavljanja': [tk['frequency'], 0] # ???????
|
||||||
}
|
}
|
||||||
for tk in data if tk['canonical'] not in prepovedane_besede
|
for tk in data if tk['canonical'] not in prepovedane_besede
|
||||||
]}
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -657,7 +657,7 @@ components:
|
|||||||
type: string
|
type: string
|
||||||
kanonicnaoblika:
|
kanonicnaoblika:
|
||||||
type: string
|
type: string
|
||||||
definition:
|
definicija:
|
||||||
type: string
|
type: string
|
||||||
POSoznake:
|
POSoznake:
|
||||||
type: string
|
type: string
|
||||||
@@ -685,6 +685,7 @@ components:
|
|||||||
kanonicnaoblika: kanonicnaoblika
|
kanonicnaoblika: kanonicnaoblika
|
||||||
nosilnautez: 0.8008282
|
nosilnautez: 0.8008282
|
||||||
kandidat: kandidat
|
kandidat: kandidat
|
||||||
|
definicija: "Kandidat je besedna zveza, ki bi lahko bila strokoven termin"
|
||||||
JobResponse:
|
JobResponse:
|
||||||
required:
|
required:
|
||||||
- finished_job
|
- finished_job
|
||||||
|
|||||||
Reference in New Issue
Block a user