var qm = require('qminer');
// create the base object with the desired schema
var base = new qm.Base({
mode: 'createClean',
schema: [{ name: 'tweets',
fields: [{ name: 'text', type: 'string' }]
}]
});
// create the feature space object
var ftr = new qm.FeatureSpace(base, { type: "text", source: "tweets", field: "text" });
// push the data
let tweetStore = base.store('tweets');
tweetStore.push({text: "This pen is green."});
tweetStore.push({text: "This pen is yellow."});
tweetStore.push({text: "This pen is blue."});
tweetStore.push({text: "This marker is yellow."});
// update the feature space with the data
ftr.updateRecords(tweetStore.allRecords);