Closed labs20 closed 4 years ago
Hello @labs20
You can accomplish this via wink-helpers:
const helpers = require( 'wink-helpers' );
const corpus = [
['I'],
['am having', 'have'],
['a'],
['problem', 'question']
];
console.log( helpers.array.product( corpus ) );
It will produce the following output:
[
["I", "am having", "a", "problem"]
["I", "am having", "a", "question"]
["I", "have", "a", "problem"]
["I", "have", "a", "question"]
]
Hope it meets your immediate need!
Best, Sanjaya
Mmmm... guess I have to read the docs better, eh? ;]
Thanks!
Like this:
This allows to feed it with a pre cached dictionary without having to format strings to feed it.