merge marking rare name with adding name token

Only name tokens can be rare, so this should be the same
function.
This commit is contained in:
Sarah Hoffmann
2021-07-18 16:52:37 +02:00
parent 5d6aabc457
commit 86ea077092
2 changed files with 9 additions and 12 deletions

View File

@@ -70,13 +70,12 @@ class Word
}
} elseif (!$oSearch->hasName(true)) {
$oNewSearch = $oSearch->clone(1);
$oNewSearch->addNameToken($this->iId);
if (CONST_Search_NameOnlySearchFrequencyThreshold
$oNewSearch->addNameToken(
$this->iId,
CONST_Search_NameOnlySearchFrequencyThreshold
&& $this->iSearchNameCount
< CONST_Search_NameOnlySearchFrequencyThreshold
) {
$oNewSearch->markRareName();
}
);
return array($oNewSearch);
}