Identify parts of a sentence

Is there a way in Swift to identify the different parts of a given sentence string?


For example,


If given “The dog walked”, you could identify that “The dog” is the subject and “walked” is the verb




If given “Do this please”, you could identify that “Do” is the verb and “this” is the object, and there is no subject so this is a command.

Powered by WPeMatico

You may also like...

Comments are closed.