Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
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);
};