Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
.pipe(new Genie.DatasetStringifier())
.pipe(fs.createWriteStream(basicDataset, { fd: basicDatasetFD })));
// basicDatasetFD is closed here
let contexts = await
fs.createReadStream(basicDataset, { encoding: 'utf8' })
.pipe(byline())
.pipe(new Genie.DatasetParser({ contextual: false }))
.pipe(new Genie.ContextExtractor(this._schemas))
.read();
const contextualized =
fs.createReadStream(basicDataset, { encoding: 'utf8' })
.pipe(byline())
.pipe(new Genie.DatasetParser({ contextual: false }))
.pipe(new Genie.Contextualizer(contexts, {
locale: this._language,
numSamples: 20,
nullOnly: false,
}));
const contextualSynthetic = genSynthetic.generate(tmpDir, {
contextual: true,
contexts,
language: this._language,
flags: this._options.flags,
maxDepth: this._options.maxDepth,
targetPruningSize: this._options.contextualTargetPruningSize,
debug: this._options.debug,
});