This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const setSpeechNodeContext = (lang, text) => | |
| assign({ | |
| speechNodeTranscript: { | |
| text, | |
| lang, | |
| }, | |
| }); | |
| const setListenNodeContext = (lang, responses) => |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // | |
| // Available variables: | |
| // - Machine | |
| // - interpret | |
| // - assign | |
| // - send | |
| // - sendParent | |
| // - spawn | |
| // - raise | |
| // - actions |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| export enum jamoAttr { | |
| consonant, | |
| vowel, | |
| singleJamo, | |
| doubleJamo, | |
| composedJamo, | |
| validInitialPosition, | |
| validFinalPosition, | |
| verticalVowel, | |
| horizontalVowel, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| enum QtyOperators { | |
| Optional, | |
| OnePlus, | |
| ZeroPlus | |
| } | |
| type SpeechExpectation = { | |
| captureName?: string; | |
| qty?: QtyOperators; | |
| inputs: (SpeechExpectation | string)[]; | |
| union?: true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type Tuple<T, U> = [T, U]; | |
| type Predicate<T> = (value: T) => boolean; | |
| type Callback<T, U> = (value: T) => U; | |
| type Route<T, U> = <V>( | |
| predicate: Predicate<T>, | |
| callback: Callback<T, V> | |
| ) => RouteResponse<T, U | V>; | |
| interface RouteResponse<T, U> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| type Card = { | |
| id: number, | |
| phrase: string, | |
| translation: string, | |
| }; | |
| type CardQueue = Card[] | "Completed"; | |
| type CardQueues = [CardQueue, CardQueue]; | |
| type UpdatedQueues = { | |
| updatedAt: Date, | |
| queues: CardQueues, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| SELECT | |
| Asses.id, | |
| Groups.orderNum, | |
| Defs.phrase, Defs.definition AS translation, | |
| Items.phrase, Items.translation | |
| FROM WordGroups AS Groups | |
| INNER JOIN WordListAssignments AS Asses | |
| ON Groups.id = Asses.wordGroupId | |
| AND Groups.wordListId = 1 | |
| INNER JOIN WordListItems AS Items |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| CREATE TABLE `WordLists` ( | |
| `id` int NOT NULL AUTO_INCREMENT, | |
| `name` varchar(100) NOT NULL, | |
| `description` varchar(300), | |
| PRIMARY KEY (`id`) | |
| ); | |
| CREATE TABLE `WordGroups` ( | |
| `id` int NOT NULL AUTO_INCREMENT, | |
| `wordListId` int NOT NULL, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| const answers: CardAnswer[] = [ | |
| { | |
| "hesitationDetected": true, | |
| "correct": true, | |
| "timeSpent": 5000, | |
| "date": new Date("2018-11-01T15:13:00.000Z") | |
| }, | |
| { | |
| "hesitationDetected": false, | |
| "correct": false, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface CardAnswer { | |
| [key: string]: (boolean | number | date) | |
| hesitationDetected: boolean; | |
| correct: boolean; | |
| timeSpent: number; | |
| date: date; | |
| ef?: number; | |
| interval?: number; | |
| } |