Chatbot assignment

Hello All

This with regard to the assignment using Dictionaries for querying sentences from user and displaying some relevant information using certain “point of interest” as the reference

This is how I went about it. Please let me know if this is fine

I created a dictionary with keys as the “Point of interests”. In my case it is towns in South India

I get the user input and convert all of the to lower case and store in a set. I also get the keys of dictionary and create another set. I check for intersection between these two sets and print the relevant information if intersection is found, the key to the dictionary is the intersection of the two sets

Reason I convert the user string to “lower” is to normalize the input as all my keys are in lower case

During this I see that when we do
sentence = {} (it creates a dictionary by default and I have to do sentence = set({}) to convert it in to a set)

Please let me know if the above method is fine. I am yet to look at the solution for this

Thanks
Harish

Yes this is fine and good enough for the assignment.

To make it a bit generalized for practical purposes, generally given a user query, we first try to understand the intent of the query, that is, what type of question category an user is asking. After classifying the intent, we then proceed to extract some parameters from the user query called as entities (and corresponding values), which tells us about the specifics of the query for that intent, based on which we can try to answer the question.

There is also a broader notion of something called domains. That is, there can be different domains of queries, each domain having some good number of intents associated with it.

The detection of such domains, intents and entities won’t be straight-forward unless one is building a basic chatbot. There are many ways to go about parsing out such parameters from a query using NLP (can even be rule-based).

For more understanding, this can help:

Thank you very much for the reply. Its really helpful. I will take a look at that link to understand more. If you can also help answering my latest queries on the Encoding/Decoding assignment, it will really help me