Skip to content

Commit 997019f

Browse files
authored
Merge pull request #15486 from keymanapp/change/web/remove-node-inputSequence
change(web): remove SearchQuotientNode.inputSequence 🚂
2 parents 0d56afc + 40f3887 commit 997019f

4 files changed

Lines changed: 0 additions & 25 deletions

File tree

web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-node.ts

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -178,16 +178,6 @@ export interface SearchQuotientNode {
178178
*/
179179
readonly inputCount: number;
180180

181-
/**
182-
* Retrieves the sequence of inputs that led to this SearchQuotientNode.
183-
*
184-
* THIS WILL BE REMOVED SHORTLY in favor of `constituentPaths` below, which
185-
* provides an improved view into the data and models multiple paths to the
186-
* space when they exist. (Once SearchQuotientNode takes on merging &
187-
* splitting)
188-
*/
189-
readonly inputSequence: Distribution<Transform>[];
190-
191181
/**
192182
* Reports the length in codepoints of corrected text represented by completed
193183
* paths from this instance.

web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-root.ts

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,6 @@ export class SearchQuotientRoot implements SearchQuotientNode {
4747
return [];
4848
}
4949

50-
// Return a new array each time; avoid aliasing potential!
51-
get inputSequence(): LexicalModelTypes.Distribution<LexicalModelTypes.Transform>[] {
52-
return [];
53-
}
54-
5550
// Return a new instance each time; avoid aliasing potential!
5651
get bestExample(): { text: string; p: number; } {
5752
return { text: '', p: 1 };

web/src/engine/predictive-text/worker-thread/src/main/correction/search-quotient-spur.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -104,15 +104,6 @@ export abstract class SearchQuotientSpur implements SearchQuotientNode {
104104
return this.parentNode.model;
105105
}
106106

107-
/**
108-
* Retrieves the sequences of inputs that led to this SearchPath.
109-
*/
110-
public get inputSequence(): Distribution<Transform>[] {
111-
const parentInputs = this.parentNode?.inputSequence.slice() ?? [];
112-
const localInputs = this.inputs ? [this.inputs.slice()] : [];
113-
return parentInputs.concat(localInputs);
114-
}
115-
116107
get codepointLength(): number {
117108
if(this._codepointLength === undefined) {
118109
this._codepointLength = this.parentNode.codepointLength + this.insertLength - this.leftDeleteLength;

web/src/test/auto/headless/engine/predictive-text/worker-thread/correction-search/getBestMatches.tests.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,6 @@ describe('getBestMatches', () => {
106106

107107
// Just one suggestion root should be returned as the first result.
108108
assert.equal(result.totalCost, 0); // Gives a perfect match
109-
assert.equal(result.inputSequence.length, 0); // for a state with no input and
110109
assert.equal(result.matchString, ''); // an empty match string.
111110
assert.isFalse(resultState.done);
112111

0 commit comments

Comments
 (0)