Allow configuration of batch size for getting word ids