Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import { applyTransform, buildMergedTransform } from "@keymanapp/models-template
import { LexicalModelTypes } from '@keymanapp/common-types';
import { deepCopy, KMWString } from "@keymanapp/web-utils";

import { SearchSpace } from "./distance-modeler.js";
import { SearchQuotientSpur } from "./search-quotient-spur.js";
import { TokenSplitMap } from "./context-tokenization.js";

import Distribution = LexicalModelTypes.Distribution;
Expand Down Expand Up @@ -58,7 +58,7 @@ export class ContextToken {
* Contains all relevant correction-search data for use in generating
* corrections for this ContextToken instance.
*/
readonly searchSpace: SearchSpace;
readonly searchSpace: SearchQuotientSpur;
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: determine a better property name. Long-term, per #15161, this should reflect the SearchQuotientNode (previously, SearchSpace) module handler matching the token.

Perhaps searchGraphModule?


isPartial: boolean;

Expand Down Expand Up @@ -104,7 +104,7 @@ export class ContextToken {
//
// In case we are unable to perfectly track context (say, due to multitaps)
// we need to ensure that only fully-utilized keystrokes are considered.
this.searchSpace = new SearchSpace(priorToken.searchSpace);
this.searchSpace = new SearchQuotientSpur(priorToken.searchSpace);
this._inputRange = priorToken._inputRange.slice();

// Preserve any annotated applied-suggestion transition ID data; it's useful
Expand All @@ -118,7 +118,7 @@ export class ContextToken {
// May be altered outside of the constructor.
this.isWhitespace = false;
this.isPartial = !!isPartial;
this.searchSpace = new SearchSpace(model);
this.searchSpace = new SearchQuotientSpur(model);
this._inputRange = [];

rawText ||= '';
Expand Down
Loading