Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
dest: 'debug',
help: 'Enable debugging.',
});
const args = parser.parseArgs();
const options = {
rng: seedrandom.alea('almond is awesome'),
language: 'en',
targetLanguage: 'thingtalk',
thingpediaClient: new AdminThingpediaClient(args.language),
turkingMode: args.turking,
maxDepth: args.maxdepth,
debug: args.debug
};
const generator = new ThingTalk.SentenceGenerator(options);
const transform = new stream.Transform({
writableObjectMode: true,
transform(ex, encoding, callback) {
callback(null, 'S' + ex.id + '\t' + ex.utterance + '\t' + ex.target_code + '\n');
},
flush(callback) {
process.nextTick(callback);
}
});
generator.pipe(transform).pipe(args.output);
args.output.on('finish', () => process.exit());
}
return main();