mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-29 11:47:39 +00:00
change(web): remove SearchQuotientNode.inputSequence
Build-bot: skip build:web Test-bot: skip
This commit is contained in:
parent
7b3e22940a
commit
c7177cf4a2
4 changed files with 0 additions and 25 deletions
|
|
@ -178,16 +178,6 @@ export interface SearchQuotientNode {
|
|||
*/
|
||||
readonly inputCount: number;
|
||||
|
||||
/**
|
||||
* Retrieves the sequence of inputs that led to this SearchSpace.
|
||||
*
|
||||
* THIS WILL BE REMOVED SHORTLY in favor of `constituentPaths` below, which
|
||||
* provides an improved view into the data and models multiple paths to the
|
||||
* space when they exist. (Once SearchQuotientNode takes on merging &
|
||||
* splitting)
|
||||
*/
|
||||
readonly inputSequence: Distribution<Transform>[];
|
||||
|
||||
/**
|
||||
* Reports the length in codepoints of corrected text represented by completed
|
||||
* paths from this instance.
|
||||
|
|
|
|||
|
|
@ -47,11 +47,6 @@ export class SearchQuotientRoot implements SearchQuotientNode {
|
|||
return [];
|
||||
}
|
||||
|
||||
// Return a new array each time; avoid aliasing potential!
|
||||
get inputSequence(): LexicalModelTypes.Distribution<LexicalModelTypes.Transform>[] {
|
||||
return [];
|
||||
}
|
||||
|
||||
// Return a new instance each time; avoid aliasing potential!
|
||||
get bestExample(): { text: string; p: number; } {
|
||||
return { text: '', p: 1 };
|
||||
|
|
|
|||
|
|
@ -104,15 +104,6 @@ export abstract class SearchQuotientSpur implements SearchQuotientNode {
|
|||
return this.parentNode.model;
|
||||
}
|
||||
|
||||
/**
|
||||
* Retrieves the sequences of inputs that led to this SearchPath.
|
||||
*/
|
||||
public get inputSequence(): Distribution<Transform>[] {
|
||||
const parentInputs = this.parentNode?.inputSequence.slice() ?? [];
|
||||
const localInputs = this.inputs ? [this.inputs.slice()] : [];
|
||||
return parentInputs.concat(localInputs);
|
||||
}
|
||||
|
||||
get codepointLength(): number {
|
||||
if(this._codepointLength === undefined) {
|
||||
this._codepointLength = this.parentNode.codepointLength + this.insertLength - this.leftDeleteLength;
|
||||
|
|
|
|||
|
|
@ -106,7 +106,6 @@ describe('getBestMatches', () => {
|
|||
|
||||
// Just one suggestion root should be returned as the first result.
|
||||
assert.equal(result.totalCost, 0); // Gives a perfect match
|
||||
assert.equal(result.inputSequence.length, 0); // for a state with no input and
|
||||
assert.equal(result.matchString, ''); // an empty match string.
|
||||
assert.isFalse(resultState.done);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue