Home > Back-end >  module not found after cloning git repository
module not found after cloning git repository

Time:01-20

I am trying to use this: https://github.com/google-research/google-research/tree/master/rouge

I've tried cloning the git repository in the ubuntu for windows terminal, by doing

git clone https://github.com/google-research/google-research.git

And the cloning seems to go fine.

But when I try to use this script:

python3 -m rouge.rouge \
    --target_filepattern="./en_test_CN.txt" \
    --prediction_filepattern="./en_pred_CN.txt" \
    --output_filename="./en_scores.csv" \
    --use_stemmer=true \
    --split_summaries=true

It says that there is no module named rouge.rouge:

/usr/bin/python3: No module named rouge.rouge

I'm really new in this and I don't know why it's not working.

CodePudding user response:

As Tim Roberts suggested, the README specifies running that command from google-research root. Additionally, you should install the package's dependencies.

I've managed to get it running with the following steps:

  1. git clone https://github.com/google-research/google-research.git --depth=1
  2. cd google-research
  3. pip install -r rouge/requirements.txt
  4. python -m rouge.rouge --help
  •  Tags:  
  • Related