Jarvis icon indicating copy to clipboard operation
Jarvis copied to clipboard

Jarvis basic GUI with Electron (Javascript) and NLTK plugin (text_analisys)

Open JonanOribe opened this issue 6 years ago • 15 comments

After execute de "setup.sh" use "npm install" to download Node dependencies and inside jarvis launch "electron" command. You will see a little GUI(browser type) with an animation inside you can make changes using HTML,CSS and Javascript, so all you can do in a website you can do right here. With Ctrl+Shift+I you can access to development console and, as you can see, the browser's area is responsive

JonanOribe avatar Jul 26 '19 21:07 JonanOribe

is package-lock.json to be committed?

appi147 avatar Aug 03 '19 20:08 appi147

You need to install npm right?

appi147 avatar Aug 03 '19 20:08 appi147

is package-lock.json to be committed?

According to Stackoverflow - yes.

@JonanOribe

You will see a little GUI(browser type) with an animation

Yes, but I see nothing more than the loading screen. I'm not the electron-expert, but I don't see anything else implemented?

Honestly don't see the point of electron for something purely text-based like Jarvis.

pnhofmann avatar Aug 03 '19 20:08 pnhofmann

Honestly don't see the point of electron for something purely text-based like Jarvis.

Yeah I have heard about electron being resource heavy

appi147 avatar Aug 03 '19 20:08 appi147

Electron is basically a chrome-browser - of course that takes some resources ;). But my problem is rather the whole Javascript-stuff (like installing npm + requirements) plus work for integrating javascript with python for something to actually work (which isn't done yet).

But I have no problem with Web technology generally!

Just found Flexx:

https://github.com/flexxui/flexx

That's more or less like Electron - but for Python (the framework is actually pure python install-able with pip!). Especially like that flexx can run both as Desktop App and as web app in any browser!

@JonanOribe would you be OK with flexx? @appi147 what do you think?

pnhofmann avatar Aug 03 '19 20:08 pnhofmann

is package-lock.json to be committed?

According to Stackoverflow - yes.

@JonanOribe

You will see a little GUI(browser type) with an animation

Yes, but I see nothing more than the loading screen. I'm not the electron-expert, but I don't see anything else implemented?

Honestly don't see the point of electron for something purely text-based like Jarvis.

At this moment, I'm working in another pull request with a text area inside you can write the commands that you use for the console version of Jarvis. My idea around the GUI is that the actual loading screen will be just the beginning for something like this: https://codepen.io/FlyingEmu/pen/tclyg . The idea is to show all the info with a table,graph or something representative.

Really, the addition of Javascript is not just for the browser stuff, but for the implementation of NLP.js (https://github.com/axa-group/nlp.js?files=1) that is, for far, the best natural language processing library that I know. At this LAST UPDATE(I added it today) you can try this library at the console at the same time that you are seeing the browser animation. At “train-nlp.js” you can see what can of things the bot can speak about.

JonanOribe avatar Aug 04 '19 09:08 JonanOribe

that is, for far, the best natural language processing library that I know

What exactly does this library do better than pure python alternatives like Snips NLU?

pnhofmann avatar Aug 04 '19 10:08 pnhofmann

Maybe he's just a Pure JavaScript guy. Won't blame him though.

TobiOkanlawon avatar Aug 04 '19 14:08 TobiOkanlawon

that is, for far, the best natural language processing library that I know

What exactly does this library do better than pure python alternatives like Snips NLU?

Snips NLU is a library for "natural language understanding", not for "natural language processing". So, with NLU we can know the topic around the user speaks, but not generate a response as we make with NLP systems. If you want to maintain Jarvis as pure Python, ok... I will give an opportunity to NLU libraries to make a workaround for the problem of language processing after adding a dictionary with topics and responses for the NLU

JonanOribe avatar Aug 04 '19 16:08 JonanOribe

Don't understand me wrong - I'm open for lots of stuff. Whole node.js stuff is just a huge dependency - which we should discuss. And it's not like I'm the one who makes the decision "node js yes or no" ;).

So, with NLU we can know the topic around the user speaks, but not generate a response as we make with NLP systems.

Sorry, I don't really understand.

We once had a simple chatbot - was pure python and aiml based. We finally decided to remove it, because we saw no point in it (to be fair: There were never much answers added). https://github.com/sukeesh/Jarvis/commit/be4f852ec479148c754439d228b12ba9e51685b1#diff-208b4a3c8683c2bc6811d303be8651b0

No, I wasn't really talking about "smalltalk" like "I'm bored - If you're bored, you could plan your dream vacation" (even though if you want to implement something like that, that would be OK - but definitly wouldn't be a justification for adding node.js as a dependency).

What would be really nice, for example this sentence: jarvis, can you check the news for me, please?

Unfortunately our current (really) simple algorithms does recognize "check" and therefore answers:

Sorry, I could not recognise your command. Did you mean:
    * check forecast
    * check time
    * check weather
    * check ram

A better approach that would actually recognize: "the user wants news" would be quite nice. And that is what I was thinking about when hearing "natural language processing".

pnhofmann avatar Aug 04 '19 17:08 pnhofmann

If he is able to create all these features, maybe add in another branch until we come up with python alternatives. Its better to have features right, even in an another branch?

appi147 avatar Aug 07 '19 11:08 appi147

@pnhofmann The difference between NLU and NLP is that basically NLU undestands what the user want and NLP is like NLU but after understand the topics that the user have interest on, it gives the user a response about this topics. So NLP is better for a conversation but if the idea is that make Jarvis capable of understand that the user is speaking about news or another command and execute the command, NLU will be a lighter approach, so don´t worry I understand your point of view ;)

NLU,NLP,NLG...Machine learning is a world full of initials that makes the topic difficult even for those that work with them.

So, I will close this pull request and start another one with the NLU option in Python. The node version will be update in another branch as @appi147 says

JonanOribe avatar Aug 08 '19 18:08 JonanOribe

If he is able to create all these features, maybe add in another branch

Sure! But looks to me like quite some work needed to make the node integration actually work. But I'm not the node expert ;).

pnhofmann avatar Aug 09 '19 21:08 pnhofmann

So, I will close this pull request and start another one with the NLU option in Python.

Just to clarify: Not like I'm saying NLU is the only/best way or something we must use. Just a framework I once found, thought "that looks quite nice" but didn't had time to do more ;).

pnhofmann avatar Aug 09 '19 21:08 pnhofmann

How can I create a new branch on this repository?? I know how to do it on my own repo, but not the way to generate a new branch or ask for another one on a repo that is not mine

JonanOribe avatar Aug 17 '19 09:08 JonanOribe