facebookresearch / access

Code to reproduce the experiments from the paper.
Other
101 stars 36 forks source link

Generation without using a file #31

Closed Rachneet closed 3 years ago

Rachneet commented 3 years ago

Hi Louis,

I am trying to input a single sentence for simplification instead of a file. But I run into the following exception Exception: Could not infer language pair, please provide it explicitly

Since you explicitly copy the input complex file to 'exp_dir' and create a dummy simple file there, how should we tackle this if I do not want to deal with files here?

louismartin commented 3 years ago

Hi,

Yes this is due to the fact that we use the fairseq-generate interface (see this line). Feeding a string instead of a file would be possible by adapting the code to use fairseq-interactive instead but it would require some modifications. Feel free to improve and submit a pull request if that's something that you are willing to do.

Rachneet commented 3 years ago

Thanks. I will check this out.

louismartin commented 3 years ago

Closing for now, feel free to comment or open again if you are still having issues.