This app lets a user enter a first name, which is then analyzed by a machine learning model. The model determines if the entered name suggests a male or female name. Before going into detail about how to implement machine learning in your app, learn about the Xcode project that already contains a ready-to-use user interface, as well as some boilerplate code responsible for UI interactions.
- [Instructor] We are now going to create the first machine learning powered application in this course. And the demlab that you can see at the moment just receives a name, and can predict the gender that is associated with that name. So if I enter, for example a male name like Peter. Then I get the prediction that this is a male first name. And if I enter a female name like Nina, then I get the prediction that this is indeed a female first name. So let me just give you a quick introduction into this project before we get started.
And you can open up the project using the exercise files. So we have a main storyboard that includes a view controller. And here you will find some labels, a text field, and another label for which we have created outlets in our code. So we also have a viewcontroller.swift file that has two outlets names, TextField and the genderLabel. And we also adopt the UITextFieldDelegate to get a function-like text field should return.
And so that this works that this function is called, we have to assign self to our nameTextField's delegate property in viewDidLoad. So this is all the code that is already added for this user interface to work. And now we can start adding our machine learning capabilities to this application.
- What are machine learning, Core ML, Vision, and NLP?
- Adding a machine learning model to a project
- Getting predictions from machine learning models
- Converting existing machine learning models for Core ML
- Classifying images and detecting objects with Vision and Core ML
- Analyzing natural language text with NSLinguisticTagger