How to use the genie-toolkit/lib/sentence-generator.ContextualSentenceGenerator function in genie-toolkit

To help you get started, we’ve selected a few genie-toolkit examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github stanford-oval / almond-cloud / training / workers / generate-contextual-worker.js View on Github external
module.exports = function worker(args, shard) {
    const tpClient = new Tp.FileClient(args);
    const options = {
        rng: seedrandom.alea(args.random_seed + ':' + shard),
        idPrefix: shard + ':',
        locale: args.locale,
        flags: args.flags || {},
        templateFile: args.template,
        thingpediaClient: tpClient,
        maxDepth: args.maxdepth,
        targetPruningSize: args.targetPruningSize,
        debug: args.debug,
    };
    return new ContextualSentenceGenerator(options);
};