After learning all about the theory of lemmatization and the goal of an NLP-enhanced search feature, now implement the search feature in Xcode. First, have a look at how you can determine the dominant language in a given text. Afterwards, use the NSLinguisticTagger again to add each word and all the lemmas from all diary entries to your word sets to then look for intersections with your search string.
- [Instructor] Back in Xcode,…I've already opened up our NLPDiary project,…and opened up in this project the EntryFilter.swift file,…because the cool thing about that is that…to enhance our application with natural language processing,…we just need to make modifications here…in the setOfWords function.…And indeed, what we are going to do here now has…a lot to do with lemmatization, what you've learned about,…and this function is going to take a string…and produce a set of word forms from it.…
And these are going to include all of the words of the text…and their lemmas, so this is what we're trying to do.…And just to refresh your memory,…we have a string that we're going to receive…and that we're going to analyze in this function,…and we have this language parameter,…which is an inout parameter.…And inout means that modifying the local variable…will also modify the past in parameters, and without it,…the past in parameters will remain the same value,…which means that you can try to think of this as…a reference type when you're using inout…
- What are machine learning, Core ML, Vision, and NLP?
- Adding a machine learning model to a project
- Getting predictions from machine learning models
- Converting existing machine learning models for Core ML
- Classifying images and detecting objects with Vision and Core ML
- Analyzing natural language text with NSLinguisticTagger