Lines Matching refs:group

140      * @param int $group Index group (0 for non-split, token length for split)
144 public function getTokenIndex(int $group = 0): AbstractIndex argument
149 return new MemoryIndex($this->idxToken, $this->groupToSuffix($group), $this->isWritable);
153 * @param int $group Index group (0 for non-split, token length for split)
157 public function getFrequencyIndex(int $group = 0): AbstractIndex argument
159 … return new MemoryIndex($this->idxFrequency, $this->groupToSuffix($group), $this->isWritable);
187 * @param int $group
191 protected function groupToSuffix(int $group): string argument
193 if ($group === 0 && $this->splitByLength) {
196 if ($group !== 0 && !$this->splitByLength) {
197 throw new IndexUsageException("Group $group is not valid for non-split collections");
199 return $group === 0 ? '' : (string)$group;
210 * @param int $group Index group (0 for non-split, token length for split)
214 public function resolveTokenFrequencies(int $group, array $tokenIds): array argument
216 $freqIndex = $this->getFrequencyIndex($group);
235 foreach ($groups as $group) {
236 $freqIndex = $this->getFrequencyIndex($group);
278 foreach ($groups as $group) {
279 $tokenIndex = $this->getTokenIndex($group);
280 $freqIndex = $this->getFrequencyIndex($group);
286 "Group $group: missing " .
295 "Group $group: token count ($tc) != frequency count ($fc)"
370 $group = $this->splitByLength ? Tokenizer::tokenLength($token) : 0;
371 $groups[$group][$token] = $freq;
376 foreach ($groups as $group => $tokenFreqs) {
377 $tokenIndex = $this->getTokenIndex($group);
378 $result[$group] = [];
381 $result[$group][$tokenId] = $freq;
471 $group = (int)(array_pop($parts) ?? 0);
472 $result[$group][$tokenId] = 0;
486 foreach ($data as $group => $tokens) {
487 $prefix = $group === 0 ? '' : "$group*";
508 foreach ($data as $group => $tokens) {
509 $freqIndex = $this->getFrequencyIndex($group);