NeuroNER icon indicating copy to clipboard operation
NeuroNER copied to clipboard

Issue while running the NeuroNER on windows system

Open Peacelover01 opened this issue 5 years ago • 2 comments

File "", line 1, in runfile('D:/PhD/Literature/NeuroNER-master/src/main.py', wdir='D:/PhD/Literature/NeuroNER-master/src')

File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 827, in runfile execfile(filename, namespace)

File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile exec(compile(f.read(), filename, 'exec'), namespace)

File "D:/PhD/Literature/NeuroNER-master/src/main.py", line 446, in main()

File "D:/PhD/Literature/NeuroNER-master/src/main.py", line 395, in main evaluate.evaluate_model(results, dataset, y_pred, y_true, stats_graph_folder, epoch_number, epoch_start_time, output_filepaths, parameters)

File "D:\PhD\Literature\NeuroNER-master\src\evaluate.py", line 256, in evaluate_model conll_parsed_output = utils_nlp.get_parsed_conll_output(conll_output_filepath)

File "D:\PhD\Literature\NeuroNER-master\src\utils_nlp.py", line 54, in get_parsed_conll_output line = conll_output[1].split()

IndexError: list index out of range

Peacelover01 avatar Dec 02 '19 05:12 Peacelover01

Can we use the NeuroNER model for Urdu language, spacy does't support Urdu language. Also can we use other word embedding like Facebook fasttext.

Peacelover01 avatar Dec 14 '19 14:12 Peacelover01

File "D:\PhD\Literature\NeuroNER-master\src\utils_nlp.py", line 54, in get_parsed_conll_output line = conll_output[1].split()

IndexError: list index out of range

https://github.com/Franck-Dernoncourt/NeuroNER/blob/master/neuroner/utils_nlp.py#L54

conll_output = [l.rstrip().replace('%','').replace(';','').replace(':', '').strip() for l in codecs.open(conll_output_filepath, 'r', 'utf8')]
parsed_output = {}
line = conll_output[1].split()

It seems conll_output_filepath is an empty file.

Check your calling function: https://github.com/Franck-Dernoncourt/NeuroNER/blob/master/neuroner/evaluate.py#L262

conll_output_filepath = '{0}_conll_evaluation.txt'.format(output_filepaths[dataset_type])
shell_command = 'perl {0} < {1} > {2}'.format(conll_evaluation_script, output_filepaths[dataset_type], conll_output_filepath) 

Seems perl command doesn't dump anything into conll_output_filepath

kaushikacharya avatar Dec 14 '19 17:12 kaushikacharya