You need to sign in or sign up before continuing.
Reconsider trainingData.startRecording()
@fabian Brought up a point about the trainingData class, and its current, stateful API.
It does this:
trainingData.startRecording("myLabel");
trainingData.addElement(element);
trainingData.stopRecording();
That could cause problems if these functions aren't called in the right order. A safer API would be:
trainingData::phrase *myPhrase = trainingData.createPhase(); //returns a pointer to a phrase
myPhrase.addElement(<element>);