Xi O
Xi O

Reputation: 21

Core ML swift use cases

I am creating an IOS app for a school project where the user ask the app to encrypt/decrypt strings using an asymmetric algorithm.

I would like the user to be able to 'talk' to the machine as if where talking to another human. For example the user could ask the app "Could you encrypt 'How are you?' for me, using Johns public key?" The app will then return 'How are you' encrypted with Johns public key.

I have watched the WWDC17 sessions on core ML. However I am not sure if it is applicable to my use case. Should I use Core ML or NLP? Or should I just look for key words in the sentence? If I should use Core ML what framework should be used to create the Model?

Upvotes: 0

Views: 565

Answers (2)

Matthijs Hollemans
Matthijs Hollemans

Reputation: 7902

A simple way to get this working is to use the Speech framework that @dannymout mentioned to turn the user's speech into text. But I suggest you take two steps:

In the first step the user says something like "Encrypt please" or "I want to decrypt", but not the actual text yet. So here you just look for the word "encrypt" or "decrypt" to figure out what to do. (You could use some basic NLP for this or just do a string search.)

Then the app says, "What text would you like to encrypt?" Now the user speaks again, and you take that input and encrypt it and show the results.

(I guess for decrypting they would type in the encrypted text rather than say it, but you can have the app speak the text once it is decrypted.)

Upvotes: 2

dannymout
dannymout

Reputation: 101

So, if I understand correctly, you're trying to build a chatbot. I'd suggest using NLP and the Speech framework for voice dictation or just looking for the key words using the input from Speech.

CoreML would be a lot more complicated to get setup, not really suited for your use case, and offers nothing more than NLP, and would be more difficult to use. NLP was made for doing things like this.

Looking for key words might be even more easier, as the input your app would be getting probably won't be any more broad than, "encrypt this using this algorithm".

Upvotes: 1

Related Questions