I want to use it in the code
How to export a model with confidence using create ml
Check out the documentation for Text Classifier predictionsWithConfidence. This is API you can use in Swift on a Text Classifier that you have trained with CreateML that will return both predicted labels and a confidence score for each.