Group Group Group Group Group Group Group Group Group

raywenderlich.com Forums

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


This is a companion discussion topic for the original entry at https://www.raywenderlich.com/5213-natural-language-processing-on-ios-with-turi-create

I know that Apple owns Turi, but I’m wondering if there is any way to export a model created with Turi Create to Android as well as iOS? Or a way to convert a Turi or CoreML model to something useable in an Android app? Turi Create looks very easy to use but it would be great if it had cross-platform support for mobile apps. Is there any known way to accomplish this?

It’s a little out of scope, but the short answer is yes. The library is built on top of Graphlab https://turi.com/products/create/docs/index.html, which is exportable to all sorts of other execution models beyond coreml.

ahem … the Yeats poem you used to test the model is also in the training data: data.text[9] :wink:

oy vey. good catch, thanks. :anguished:

the Turi command “sentence_classifier” is renamed to “text_classifier”

Here is the reference link

thanks so much for the heads up! I’ve updated the tutorial. Fortunately that was the only piece that had to be changed.

One nice thing about having projects like this up on github, it allows Apple to publish major updates more frequently than the once-a-year with the os updates. The downside is that it’s harder to keep external documentation like this current.

Hi there, thanks for the great tutorial.

I have a question.

What ever we write in the beginning, the most common probability is Emily Dickinson. After some large number of words, it comes to the point that the model detects the correct author.

The reason is because of the large number of Data of Emily Dickinson, compare the other authors ?

Since I am new in this ML word, I hope I am not asking something completely obvious or stupid :wink:

And in case of that issue of large amount of data compare to small, what kind of features could someone use ?

Thanks

P

@mkatz Can you please help with this when you get a chance? Thank you - much appreciated! :]

exactly. Because of disproportionate amount of data for her, it does lean in that way (there’s more signal). Unfortunately I had only a limited amount of time to gather the data, and added it by hand, so there’s that.

One of the hardest parts of machine learning is having good data to start with.

1 Like

I am trying to create an exact same project by using a fine that I found online but I end up on a very weird behaviour.

Could you please help why this is happening ?

I tried to create the same with MLRegressor but you can’t do that since the CreateML accepts only Int or Double for Target.

@mkatz Can you please help with this when you get a chance? Thank you - much appreciated! :]

@scy Please check out this thread when you get a chance:

I hope it helps!

This tutorial is more than six months old so questions are no longer supported at the moment for it. Thank you!