yanmtt
yanmtt copied to clipboard
To avoid StopIteration error. Change from while-loop to for-loop.
While-loop here stop when there is no more elements from the generator. next(monolingual_generator) will raise StopIteration when there is no more element to return. Using for-loop to avoid StopIteration.