Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Answering any question #32

Open
ritwik12 opened this issue Apr 26, 2018 · 17 comments
Open

Answering any question #32

ritwik12 opened this issue Apr 26, 2018 · 17 comments

Comments

@ritwik12
Copy link
Owner

Here in this feature, the virtual assistant should be able to answer almost all the questions which are available on the internet. The basic approach is to fetch the answer(knowledge) from the internet (such as Google or Wikipedia) and passing it back to the answer.
The approach which I know is to get the data from Wikipedia using Wikipedia APIs and getting the data in JSON format and converting it to string for printing on the terminal.
For further knowledge please see these links-
https://stackoverflow.com/questions/8555320/is-there-a-clean-wikipedia-api-just-for-retrieve-content-summary

The JSON data will look like these links -
https://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts&exintro=&explaintext=&titles=google
https://en.wikipedia.org/w/api.php?action=opensearch&search=facebook

The data can be fetched using above link and for converting it from JSON to string please refer our Restaurant feature.

@sanket-mali
Copy link

sanket-mali commented Oct 1, 2018

I like to work on this..

@sanket-mali
Copy link

i need a little clarification.. when this function will be invoked.. when the text will not be matched with the any default class??

@ritwik12
Copy link
Owner Author

ritwik12 commented Oct 1, 2018

@sanket-mali When this funtion will be invoked then we need to create another class/category for this functionality just like other functionalities (weather, restaurant, media, etc).

@ritwik12
Copy link
Owner Author

ritwik12 commented Oct 1, 2018

@sanket-mali Please forward with your work on this and if you face any problems I am here to help.

@sanket-mali
Copy link

In this functionality what will be the difference with the normal scenario like if we write any random word as of now it opens a browser window and search it with google..

@ritwik12
Copy link
Owner Author

ritwik12 commented Oct 1, 2018

@ritwik12 Right now we are just doing google search for the sentences we don't know. With this new functionality we can get the answer of questions just like Cortana or Siri or Google assistant answers when we ask something like "what is github?" or " which is the closest star?" etc

@vnksnkr
Copy link
Contributor

vnksnkr commented Sep 11, 2020

Is this issue still open?I would like to work on it

@ritwik12
Copy link
Owner Author

@vnksnkr Yes this is open, please go ahead!!

@vnksnkr
Copy link
Contributor

vnksnkr commented Sep 13, 2020

@ritwik12 thanks, I'm working on the wikipedia api..can you clarify on how to implement the same via google search?

@ritwik12
Copy link
Owner Author

@vnksnkr Fetching details directly from Wikipedia would not be an intelligent way to do this. It could be a part of the whole process but we need something better to intelligently scrap the internet and answer the question.

@vnksnkr
Copy link
Contributor

vnksnkr commented Sep 13, 2020

@ritwik12 does google allow to scrape their search results? one way is to use their api

@ritwik12
Copy link
Owner Author

@vnksnkr No, it isn't too direct. We need an Algorithm here to work this out. Google API could be a part of it too but again not just fetching from that.

@vnksnkr
Copy link
Contributor

vnksnkr commented Sep 15, 2020

@ritwik12 I'm sorry I couldn't get that..Cant we use a serp api to which we can directly ask the questions and since search engines algorithms like google always show the most relevant answer (highlighted in big fonts) as the first search result..just scrape the the top one?If that wasnt the feature we were looking could you provide an example on how the algorithm should respond?

@ritwik12
Copy link
Owner Author

ritwik12 commented Sep 17, 2020

@vnksnkr This is a Hack that we can use if we have the access to the Google Search results. We can look for a way to get the One Word or One Para answer from Google. For example:

when is Christmas?
Google answers it simply like Friday, 25 December
Screenshot 2020-09-17 at 12 48 22 PM

But for cases like What is Deep Learning?

It does not give us a direct answer, in that case, we need to fetch a brief summary from the first link or what google shows at the right side of the page which is Wikipedia Definition as shown below:
Screenshot 2020-09-17 at 12 44 52 PM

Similarly, there could be many cases. Like things like a simple science question etc, etc.

The goal of this project is to have learning by solving complex problems in unique ways. If it was a market product I would have suggested you simply scrap from APIs and do the stuff.

@vnksnkr
Copy link
Contributor

vnksnkr commented Sep 18, 2020

@ritwik12 Thanks for the clarification..my initial thought process was to collect relevant results using common sources like Wikipedia, Quora, google search etc and crank up some way to display the most relevant result

@vnksnkr
Copy link
Contributor

vnksnkr commented Oct 15, 2020

@ritwik12 I was really looking forward to making a PR..unfortunately bringing up an ML algorithm is something out of my reach right now..although i would love to learn it someday soon..still I'm really interested in this repo and I'm hoping to contribute..I'll probably look into some other issue and work my way around it. :)

@ritwik12
Copy link
Owner Author

@vnksnkr Thanks :)
Sure, feel free to pick up any issue or if you think there is anything that will be good for this project. Feel free to open up new issues too. it could be a Bug fix, Feature request etc

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

No branches or pull requests

3 participants