add method to find pertubation value

Button 'ngram embed' might not needed as the feature in embedAll
function is needed while doing ngram for embedded jpeg.