bheinzerling / pyrouge

A Python wrapper for the ROUGE summarization evaluation package
MIT License
250 stars 71 forks source link

Fix env variable when calling check_output #28

Closed mgrenander closed 5 years ago

mgrenander commented 5 years ago

The evaluate function currently sets the ROUGE_EVAL_HOME environment variable, but discards all others. This can cause failures when other environment variables are needed to run pyrouge. For example, we may need the PERL5LIB env variable to be able to locate certain Perl libraries needed to run ROUGE.

This PR fixes this by copying the current OS environment variables, and updating the ROUGE_EVAL_HOME one if needed, instead of only setting ROUGE_EVAL_HOME and discarding all others.

bheinzerling commented 5 years ago

Thank you!