Skip to content
This repository has been archived by the owner on Apr 30, 2023. It is now read-only.

Nltk Similar word matching #2

Open
ShrikrishnaPatil opened this issue Aug 23, 2019 · 2 comments
Open

Nltk Similar word matching #2

ShrikrishnaPatil opened this issue Aug 23, 2019 · 2 comments

Comments

@ShrikrishnaPatil
Copy link

How to impliment same word meaning chatbot like

if user ask about discription
and in raw data "a spoken or written account of a person, object, or event."4
this text is present so how to impliment...using nltk

@KalyanPattem
Copy link

Hello Krishna,

In the nltk we will use one textfile,like we used in the example chat text file.There we can add the respective test based on the keywords.So when you are searching for it ,that will return the result which you mentioned the file.
Hope this helps!

Thanks,
Kalyan

@mumtazmalik
Copy link

Hello Krishna,
Another idea is to group synonyms as a sentence in your corpus. For example, the first sentence in your corpus should be a set of synonyms of a certain word and the word itself. You can find this data easily and using the same code, you will tokenized the response generated using this code, tokenize it and return either of the token.

For example, there is a sentence "happy cheerful contented delighted ecstatic elated joyous overjoyed pleased." in your corpuse. Now your input 'happy', this bot will return "happy cheerful contented delighted ecstatic elated joyous overjoyed pleased.". The idea is you will tokenize this sentence, removed happy from the tokens and return any word, that would be the meaning of happy. If you have a large data set, this could be a great idea for meanings bot.

The idea way is to use neural word embedding that works fairly good.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants