Redmine #1487: changes with new classla version

This commit is contained in:
Cyprian Laskowski 2021-03-10 18:43:27 +01:00
parent 7aa2381683
commit e3aa8a3aee

View File

@ -15,9 +15,10 @@ from nova_slovnica.translate_jos import translate as translate_jos
from nova_slovnica.conllu_to_xml import convert_file as conllu_to_tei
NLP_CONFIG_MAP = {
'treebank': 'sl_ssj_jos',
'type': 'standard_jos',
'processors': 'tokenize,pos,lemma,depparse',
'tokenize_pretokenized': True,
'pos_use_lexicon': True,
'models_dir': None
}
@ -33,7 +34,7 @@ def __get_tmp_file_name(file_key):
def initialise(**argument_map):
global resource_directory
resource_directory = argument_map['resource_dir']
NLP_CONFIG_MAP['models_dir'] = resource_directory + '/classla'
NLP_CONFIG_MAP['dir'] = resource_directory + '/classla'
def import_file(file_name, file_key):
shutil.copyfile(file_name, __get_tmp_file_name(file_key))