textgen: calculate score threshold at learning