Post not yet marked as solved
Click to stop watching this thread.
You have stopped watching this post. Click to start watching again.
contentPostList.repliesup-voted.tooltip
Replied In
error: cannot find 'MLDataTable' in scope
I notice I left a partial line in there, but it does not work when that is removed. Here is the actual code that is failing
import CoreML
import Foundation
import TabularData
//let dataset = try MLDataTable(contentsOf: URL(fileURLWithPath: "/Users/vardhanagrawal/Downloads/sentiment_analysis.json"))
//let (trainingData, testingData) = dataset.randomSplit(by: 0.8, seed: 5)
let jsonFile = Bundle.main.url(forResource: "sentiment_analysis", withExtension: "json")!
let dataTable = try MLDataTable(contentsOf: jsonFile)
/*:
Pass your data table to print() to see a pretty-printed sample of its contents in the console.
*/
print(dataTable)