Franck-Dernoncourt/NeuroNER

Evaluate model on the train set - Perl Script Error

ashikrafi opened this issue · 2 comments

Dear Team,

Thank you very much for NeuroNER. Excellent. However, I have encountered a bug which I have tried to solve but failed.

After the completion of Training, It shows,
"Evaluate model on the train set
Can't open perl script "C:\Program": No such file or directory
Evaluate model on the test set
Can't open perl script "C:\Program": No such file or directory"

I have installed perl in C drive. (c:\Strawberry).. Could you please tell me what I should do now?

Regards,
Md Ashikur

@ashikrafi
It seems that you haven't added Perl installed location to the PATH environment variable.
Borodin explains how to do this in https://stackoverflow.com/questions/9454203/installing-perl-in-windows-7/9454713#9454713

In your case, it is probably looking for perl in "C:\Program Files" but due to space it gets truncated into "C:\Program" and that's why it gives the error

Can't open perl script "C:\Program": No such file or directory

To find out location of installed perl in windows, you can execute the following command in command prompt:

where perl

You seem to be getting the error in
https://github.com/Franck-Dernoncourt/NeuroNER/blob/master/neuroner/train.py#L141

shell_command = 'perl {0} < {1} > {2}'.format(conll_evaluation_script,
                output_filepath, conll_output_filepath)
os.system(shell_command)

You need to check:

  • Are you able to run a simple perl script from say C:/ folder in command prompt?
  • Are you able to run this perl script from python as mentioned in shell_command?

@kaushikacharya
Thank you very much. Now It works.

In my case, it was looking for a perl file in "C:\Program Files" but due to space it gets truncated into "C:\Program" and that's why it gave the error.

Thank you.