ritwik12 / Virtual-Assistant

A linux based Virtual assistant on Artificial Intelligence in C
GNU General Public License v3.0
128 stars 95 forks source link

Remove if else #48

Closed pavan-pan closed 4 years ago

pavan-pan commented 5 years ago

I have removed the complex if/else branch. I have used an array instead to add the scores of different classes. Finding the highest score is much easier and faster with an array.

ritwik12 commented 5 years ago

@pavan-pan Thanks a lot for your PR. There are a lot of changes in this PR. Please give me sometime to review it. It looks good.

ritwik12 commented 5 years ago

@pavan-pan Is this WIP? if not, can you please clean this PR so that I can check it.

pavan-pan commented 5 years ago

All the changes concerning reminder are removed

ritwik12 commented 5 years ago

@pavan-pan I'm out of town right now and my laptop isn't with me. Sorry I need to hold this for few days. I will merge it once I'll come back and run it on my system. Hope that's fine.

ritwik12 commented 5 years ago

@pavan-pan I've tested this but it isn't giving any outputs. Any input results in No output at all. Please check if it's working in your system.

pavan-pan commented 5 years ago

@ritwik12 I just checked it seems to be working on my system. There is no output when there are blanks and spaces otherwise it results in output.

ritwik12 commented 5 years ago

@pavan-pan Compile command is same i.e gcc main.c $(pkg-config --libs --cflags libcurl) -l json-c -std=gnu11, right?

ritwik12 commented 5 years ago

@pavan-pan it is not working for me.

pavan-pan commented 5 years ago

@ritwik12 let me check again

pavan-pan commented 5 years ago

@ritwik12 I checked out the branch pavan-pan:remove_if_else and compiled with the same which you mentioned above. It works fine for me.

I tried with commands weather, restaurants, google etc. I am not able to guess what could be the problem.

pavan-pan commented 5 years ago

@ritwik12 I have tested it on 3 different computers. I am getting the results whenever I enter something.

ritwik12 commented 5 years ago

@pavan-pan Have you downloaded from https://github.com/pavan-pan/Virtual-Assistant/archive/remove_if_else.zip and then tried running it? I guess you have done some changes in your system code which isn't here. I am still not able to run it. It isn't giving any outputs. I have gone through the code and everything looks fine.

ritwik12 commented 5 years ago

@riya-17 @speedy-software-ch @andy5995 Can you please check if this is working in your system? Maybe I am doing something wrong. I am running it on Fedora 28.

pavan-pan commented 5 years ago

@ritwik12 I downloaded again from the link you mentioned above. Typed "weather" and got the weather for my current location.

pavan-pan commented 5 years ago

I ran git pull and its updated capture

ritwik12 commented 5 years ago

@pavan-pan It's updated with your forked master, but in the upstream we have already merged "space" functionality.

pavan-pan commented 5 years ago

@ritwik12 can you try it now ?

ritwik12 commented 5 years ago

@pavan-pan Tried, still same. After downloading the repo, Did you changed anything, anywhere?

pavan-pan commented 5 years ago

@ritwik12 I change nothing. Just download, run the command that you mentioned above, run the executable, nothing more.

ritwik12 commented 5 years ago

@pavan-pan Which linux version?

pavan-pan commented 5 years ago

I am running on linux mint. I am about to try it on arch to try on a different environment.

ritwik12 commented 5 years ago

No new dependencies right?

pavan-pan commented 5 years ago

nope. Just download, compile and run. I just downloaded and ran on arch linux. No problems there. I really dont understand why. Are we running the same code ?

ritwik12 commented 5 years ago

@pavan-pan Yes, I am using this branch's code https://github.com/pavan-pan/Virtual-Assistant/tree/remove_if_else

ritwik12 commented 5 years ago

@pavan-pan Please send me the screenshot of compile and run. Maybe I am doing something wrong.

pavan-pan commented 5 years ago

@ritwik12 capture1 capture2

ritwik12 commented 5 years ago

@pavan-pan It looks good, let's wait for others to try it. I will also keep on checking and try to run it.

riya-17 commented 5 years ago

Hey @pavan-pan, your code is working fine but only youtube and Calendar functionality are executing, for other commands it is not performing any action and just asking "Hey, How can I help you?" again and again.

ritwik12 commented 5 years ago

Hey @pavan-pan, your code is working fine but only youtube and Calendar functionality are executing, for other commands it is not performing any action and just asking "Hey, How can I help you?" again and again.

@pavan-pan Seconded

pavan-pan commented 5 years ago

@ritwik12 @riya-17 lemme check it again

pavan-pan commented 5 years ago

@ritwik12 @riya-17 the code is still working for me correctly. I am not sure what the problem is. Is it possible to send me the code in a zip in a mail or some way ?

riya-17 commented 5 years ago

@pavan-pan Yaa sure we can try that. Please mail the code on these email ids : riyad17031998@gmail.com and ritwik.1204@gmail.com . We will look into it and get back to you. Thanks :)

pavan-pan commented 5 years ago

@riya-17 I have sent you the code

pavan-pan commented 5 years ago

Any one checked the code i sent ?

ritwik12 commented 5 years ago

Any one checked the code i sent ?

Yes, we did and it was giving the same outputs as we have told you. There's some issue I guess.

pavan-pan commented 5 years ago

@ritwik12 if you can give me more information about where its failing or under what conditions its failing i can try to solve this problem. The reason i need this information is because i cannot reproduce the issue.

ritwik12 commented 4 years ago

@pavan-pan Thanks a lot for all your hardwork here, I guess we couldn't reach to a conclusion here. Please feel free to contribute in future too. Closing this now