I'm trying to implement MASS on Fairseq for Neural Machine Translation. Following the approach here https://github.com/microsoft/MASS/tree/master/MASS-supNMT, I'm trying to preprocess both the monolingual and bilingual data. I didn't get any errors while processing monolingual data; however, I'm getting the error while doing for bilingual.
from fairseq.data.masked_lm_dictionary import MaskedLMDictionary ModuleNotFoundError: No module named 'fairseq.data.masked_lm_dictionary'
I'm using Fairseq version 0.12.2. I'm unable to figure out the reason behind the error.
According to this file, you could use the
MaskedLMDictionary
as a class. To import it you can use the following code:This doesn't return the error you mentioned.