Hi,
Just found out that MLWordTagger can help my application in a huge way. Create ML is simple, that is awesome! Everything works great, but I do not see fast training. Creating MLWordTagger barely uses one core. Why is that? Can it be faster? Maybe my question is dumb, but I'm new to this.
BTW, there is basically no information on this subject in the Internet. Why? This is so incredibly powerful feature!
Here is my code:
private func train(trainingDataUrl: URL, validationDataUrl: URL, outputTo modelUrl: URL) {
let trainingData = try! MLDataTable(contentsOf: trainingDataUrl)
let testingData = try! MLDataTable(contentsOf: validationDataUrl)
let model = try! MLWordTagger(
trainingData: trainingData,
tokenColumn: "tokens",
labelColumn: "labels",
parameters: MLWordTagger.ModelParameters(validationData: testingData)
)
try! model.write(to: modelUrl)
}