Utilities for tdm apps
lib | 7 years ago | ||
test | 7 years ago | ||
.gitignore | 7 years ago | ||
README.md | 7 years ago | ||
index.beta.js | 7 years ago | ||
index.js | 7 years ago | ||
package.json | 7 years ago |
Utilities for tdm EzMaster Applications
var corpusManager = require('tdm-utils'); // Directory containing all corpus files var myCorporaDirectory = "/path/to/my/corpora/"; // Example : // $ ls /path/to/my/corpora/ // $ corpus1.txt corpus2.txt // Directory where all data will be writed var myOutputDirectory = "/path/to/my/output/directory/"; // Initialize all corpora corpusManager.prepare(myCorporaDirectory, myOutputDirectory, function(err, res) { console.log(res); // Do some stuff });
Ouput :
// [ Corpus { // name: 'corpus1', // file: 'test/dataset/out/corpus1.txt', // in: 'test/dataset/out/in/corpus1', // out: 'test/dataset/out/out/corpus1' }, // Corpus { // name: 'corpus2', // file: 'test/dataset/out/corpus2.txt', // in: 'test/dataset/out/in/corpus2', // out: 'test/dataset/out/out/corpus2' } ]