I want to create a MLDataTable with one feature and three targets using Create ML framework. For example, let us assume I'm creating a calendar app, which has a feature to add quick event like the Native Mac Calendar app. I have a feature column text which contains strings like Club game at Nehru Stadium, Chennai on Saturday Morning. I want the three target columns title, location and time to get the values Club game, Nehru Stadium, Chennai and 24 Nov 2018, 08:00.
Also, Kindly let me know if there are any other ways to implement the same using CreateML framework.
You can train MLWordTagger for this task. Create a training data file (JSON) in this format.
You can train with the code below in Playground.
And then use this prediction method to predict each of your tokens in the sentence.
This method return an array of tags for the tokens.
An alternative way of doing this is using NLTagger which is already able to detect place names, organization names but time.
This will return the output below, so you will only need to train model to detect the adverb of time.