Implementing a Natural Language Classifier in iOS with Keras + Core ML

(Jeff_L) #1

SwiftNLCTestClient: A simple test iOS application to play with


the wrapper and the Core ML model


Detailed instructions:


Importer — Swift script to import from Watson


and others


This sub-project contains Swift code (to be executed on Linux or


macOS environments) to import a le containing the dataset used to


train the NLC model.


The idea is to provide dierent importers for dierent le formats in


order to import datasets from existing NLU/NLC/Conversation


platforms such as IBM Watson, AWS Alexa/Lex, Google DialogFlow etc.


The rst importer implemented is for the IBM Watson Conversation


service. Watson uses a JSON “workspace” le containing intents with


several sample utterances, entities (slots), also with sample utterances,


as well as a tree for complex dialog management of long-running


conversation. This project is solely about NLC, and it only import


intents and sample utterances from this le.


Usage example:


Watson import
../../SampleIntents/Watson/WatsonConversationCarWorksp
ace.json dataset.json

Generated dataset.json example:


{

"intents" : [
{
"intent" : "hello",
"utterances" : [
"hello",
"good morning"
]
}
]
}

Free download pdf