mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-29 11:47:39 +00:00
change(web): Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
This commit is contained in:
parent
c3e0d3447c
commit
efa4ffee27
1 changed files with 3 additions and 9 deletions
|
|
@ -35,15 +35,9 @@ export class ContextTokenization {
|
|||
* tokens represented by this tokenization instance.
|
||||
*/
|
||||
get exampleInput(): string[] {
|
||||
const sequence: string[] = [];
|
||||
|
||||
for(const token of this.tokens) {
|
||||
return this.tokens
|
||||
// Hide any tokens representing wordbreaks. (Thinking ahead to phrase-level possibilities)
|
||||
if(token.exampleInput !== null) {
|
||||
sequence.push(token.exampleInput);
|
||||
}
|
||||
}
|
||||
|
||||
return sequence;
|
||||
.filter(token => token.exampleInput !== null)
|
||||
.map(token => token.exampleInput);
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Reference in a new issue