Natural Language Processing on iOS with Turi Create

In this Natural Language Processing tutorial, you’ll learn how to train a Core ML model from scratch, then use that model within an iOS Application By Michael Katz.

Leave a rating/review
Download materials
Save for later
Share
You are currently viewing page 4 of 4 of this article. Click here to view the first page.

Where To Go From Here?

You can get the KeatsOrYeats-final project from the Download Materials link at the top or bottom of this tutorial.

If you are feeling adventurous and want to take things further, you could easily build on this tutorial by designing your own text classifier. If you have a large data set with known labels, such as reviews and ratings, genres or filters, it would make a good fit. You can also build more accurate models by feeding them more data or providing multiple columns in the features input to classifier.create(). Good candidates would be a poem’s title or style.

Another way to get more accurate predictions is to clean up the input data. Unfortunately, there aren’t a lot of options available to the text_classifier, but you can use the logic classifier directly. That way, you can provide a massaged input that eliminates common words or uses an n-gram (pair of words rather than a single word) for a more accurate analysis. Turi Create also has a number of helper functions for this purpose available.

You can also learn more about Core ML and machine learning with these other tutorials: Beginning Machine Learning with scikit-learn and Beginning Machine Learning with Keras & Core ML.

Hopefully, you’re interest in all things NLP and machine learning has been piqued! If you’re looking to connect with other like-minded developers, or just want to share something cool, feel free to join the discussion in the forum below!