Redmine #1487: changes with new classla version
This commit is contained in:
parent
7aa2381683
commit
e3aa8a3aee
|
@ -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
|
from nova_slovnica.conllu_to_xml import convert_file as conllu_to_tei
|
||||||
|
|
||||||
NLP_CONFIG_MAP = {
|
NLP_CONFIG_MAP = {
|
||||||
'treebank': 'sl_ssj_jos',
|
'type': 'standard_jos',
|
||||||
'processors': 'tokenize,pos,lemma,depparse',
|
'processors': 'tokenize,pos,lemma,depparse',
|
||||||
'tokenize_pretokenized': True,
|
'tokenize_pretokenized': True,
|
||||||
|
'pos_use_lexicon': True,
|
||||||
'models_dir': None
|
'models_dir': None
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -33,7 +34,7 @@ def __get_tmp_file_name(file_key):
|
||||||
def initialise(**argument_map):
|
def initialise(**argument_map):
|
||||||
global resource_directory
|
global resource_directory
|
||||||
resource_directory = argument_map['resource_dir']
|
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):
|
def import_file(file_name, file_key):
|
||||||
shutil.copyfile(file_name, __get_tmp_file_name(file_key))
|
shutil.copyfile(file_name, __get_tmp_file_name(file_key))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user