eliza-core
Version:
A rendition of ELIZA program engine by Weizenbaum sharable for all javascript environments
16 lines (15 loc) • 458 B
TypeScript
import { Key } from './key';
/**
* Break the string `s` into words.
* For each word, if `isKey` is true, then push the key into the stack.
*
* @export
* @param {KeyStack} stack
* @param {string} s
*
* Learned from `KeyList.buildKeyStack(KeyStack stack, String s)`
*
* Rank keeping algorithm from `KeyStack#pushKey` method has been merged
* into this method as well.
*/
export declare function buildKeyStack(keys: Key[], tokens: string[]): Key[];