From f6d2141a480dd6b5b8ee0e48d43bb64773232791 Mon Sep 17 00:00:00 2001 From: Navan Chauhan Date: Tue, 26 Mar 2024 23:38:14 -0600 Subject: add header ids --- .../2021-06-27-Crude-ML-AI-Powered-Chatbot-Swift.html | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'docs/posts/2021-06-27-Crude-ML-AI-Powered-Chatbot-Swift.html') diff --git a/docs/posts/2021-06-27-Crude-ML-AI-Powered-Chatbot-Swift.html b/docs/posts/2021-06-27-Crude-ML-AI-Powered-Chatbot-Swift.html index 9b90d53..5836c49 100644 --- a/docs/posts/2021-06-27-Crude-ML-AI-Powered-Chatbot-Swift.html +++ b/docs/posts/2021-06-27-Crude-ML-AI-Powered-Chatbot-Swift.html @@ -6,13 +6,13 @@ - Making a Crude ML Powered Chatbot in Swift using CoreML + id="making-a-crude-ml-powered-chatbot-in-swift-using-coreml">Making a Crude ML Powered Chatbot in Swift using CoreML - - + Making a Crude ML Powered Chatbot in Swift using CoreML" /> + Making a Crude ML Powered Chatbot in Swift using CoreML" /> @@ -44,7 +44,7 @@
-

Making a Crude ML Powered Chatbot in Swift using CoreML

+

Making a Crude ML Powered Chatbot in Swift using CoreML

A chatbot/virtual assistant, on paper, looks easy to build. The user says something, the programs finds the best action, checks if additional input is required and sends back the output. @@ -52,7 +52,7 @@ To do this in Swift, I used two separate ML Models created using Apple's Create First is a Text Classifier to classify intent, and the other a word tagger for extracting input from the input message. Disclaimer: This is a very crude proof-of-concept, but it does work.

-

Text Classifier

+

Text Classifier

I opened a CSV file and added some sample entries, with a corresponding label.

@@ -84,7 +84,7 @@ i love you,banter

Screenshot of Create ML Text Classifier

-

Word Tagging

+

Word Tagging

This is useful to extract the required variables directly from the user's input. This model will be only called if the intent from the classifier is a custom action. @@ -112,7 +112,7 @@ I created a sample JSON with only 3 examples (I know, very less, but works for a

Screenshot of Create ML Text Classifier

-

Time to Get Swift-y

+

Time to Get Swift-y

The initial part is easy, importing CoreML and NaturalLanguage and then initializing the models and the tagger.

-- cgit v1.2.3