|
|
|
@ -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))
|
|
|
|
|