Welcome to Synthiam!

Program robots using technologies created from industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation and artificial intelligence easy.

Get Started
Asked — Edited

Javascript Plugin

I am sure the answer is no but have to ask.

Is it possible to add/install a JavaScript library within EZ-Builder?

AI Support Bot
Related Content
Synthiam
#2  
@DJ
You are Awesome!
I am now going to try and work with an NLP library to process and analyze speech.
Thank you
#3  
Which NLP are you going to use? I'm being nosey.
PRO
Synthiam
#4  
ARC isn't a web browser, so i'm not sure how that will work.
#5  
@DJ
It works GREAT!


@Justin
I am using Compromise.
here is a link
https://github.com/spencermountain/compromise

In the Builds folder, I am using the compromise.js

Code:


var doc = nlp('the quick brown fox jumped over the lazy dog')
var str = doc.nouns().out('text')
var ccc = doc.match('#Adjective fox').out('text')
var vrb = doc.verbs().out('text')
var frstn = doc.nouns().first().out('text')
print(ccc)
print(vrb)
print(frstn)
print(str)


and the output of this is:

Code:


Started
brown fox
jumped
fox
fox dog
Done (took: 00:00:00.1420776)
#6  
Don't judge the coding, Keep in mind I am just learning JavaScript.
#8  
This should take my Simple Robot Brain to the next level.
After I get a better handle on JavaScript.
#10  
An example of what it can do:

The JavaScript

Code:


var doc = nlp(EZB.GetVar("$TheSentence"))
var pastTense = doc.sentences().toPastTense().out()
EZB.SetVar("$pastTense", pastTense)


The EZ-Script code

Code:


$TheSentence = "The dog will eat his food"
ControlCommand("Compromise",ScriptStartWait)
Print($pastTense)


The resulting output

Code:


Start
1: $TheSentence = "The dog will eat his food"
3: ControlCommand("Compromise",ScriptStartWait)
5: Print($pastTense)
> The dog ate his food
Done (00:00:00.2999611)


This is cool!