Open massadm opened 1 year ago
https://github.com/yooper/php-text-analysis/blob/9b96d252f334f8ee35e067a0c7a40c24dc87a01d/src/Analysis/FreqDist.php#L119-L124
Perhaps there is a mistake.
array_walk: If the optional third parameter is supplied, it will be passed as the third parameter to the callback funcname.
array_walk
So, $weightPerToken inside callback is just $this->totalTokens not $this->getWeightPerToken().
$weightPerToken
$this->totalTokens
$this->getWeightPerToken()
It has been awhile since I worked on the code base. Can you provide an example that tests the differences in your suggestion and provide the information here in this issue?
Thank you
https://github.com/yooper/php-text-analysis/blob/9b96d252f334f8ee35e067a0c7a40c24dc87a01d/src/Analysis/FreqDist.php#L119-L124
Perhaps there is a mistake.
array_walk
: If the optional third parameter is supplied, it will be passed as the third parameter to the callback funcname.So,
$weightPerToken
inside callback is just$this->totalTokens
not$this->getWeightPerToken()
.