in reply to Find a good starting section of a long text
Then use the minimum of ( ($goal - $test) * 1/$weight ) ** 2
Tuning the weight of the tests requires looking at sample data, but (30, 15, 5) for par, sen and word should be a start. The given example weights a paragraph deviating by 30 chars from $goal the same as a word deviating 5 chars.
|
|---|