Competence-based Curriculum Learning for Neural Machine Translation