reduce search depth when splitting word sets

Too many out-of-memory conditions with the current algorithm.
This commit is contained in:
Sarah Hoffmann 2016-10-12 20:09:20 +02:00
parent 0e613a362e
commit c0b4411337

View File

@ -55,7 +55,7 @@ function getWordSets($aWords, $iDepth)
{
$aResult = array(array(join(' ', $aWords)));
$sFirstToken = '';
if ($iDepth < 8) {
if ($iDepth < 7) {
while (sizeof($aWords) > 1) {
$sWord = array_shift($aWords);
$sFirstToken .= ($sFirstToken?' ':'').$sWord;