Allows to restrict sample according to sentence length