- Hew-bot
- A Customizable, Kegorator-Powered Life Embetterment Robot
- Written in Node.js and Coffeescript
- Uses Redis to persit data in its "Robot Brain"
- The Devil
- CoffeeScript is an attempt to expose the good parts of JavaScript in a simple way.
- Written By Jeremy Ashkenas
- Compiles to vanilla Javascript, with no interpretation at runtime
- Originally as a chat bot and to automate running tests etc.
- Generating memes
- General time-wasting
- connects Hubot to the outside world
- Repo managed by github
- stuff the robot actually does
- Two ways .respond and .hear, respond requires a prompt (primary way)
send
the message out
- I started thinking about how limiting pre-built life-embetterment robots were
- Hubot is command driven, Siri and Google I have little control over their tasks
- What if I could merge the two?
- I started looking into how I could get Hubot to understand me more naturally
- My wife's a Master of English so I began asking her to re-teach me english syntax
- How do I get the computer to understand English?
- Tokenizing, trying to find relevant words etc.
- Started building my own language processor...really, really hard.
- Started looking for open source natural language processors for node.js
- Not nearly as roboust as I wanted
- Stanford Language Processor
- Java App
- Had node run it in a sub shell and pass it stuff
- Really slow
- Returns garbage, so I needed to create an adapter to conver to JSON
- Combined with the HTML Web Speech API
- I could now just send the entire string and get weighted results
- Well naturally I named my robot Jarvis
- And naturally I wanted him to speak in a British accent
- I could now just send plain english to my database and get weighted results
- results will have a string that will match one of the hubot scripts regex, low manipulation of hubot core.
- Run all of the robot's responses through tranlsation
- Sectioning out the parts of speech
- Localizing responses to time of day and randomizing similar response phrases
- SQLite
- Elastic Search
- Rails
- Node (Hubot)
- XMPP
- I looked at node options for elastic search apis and found that for speed of development and general niceness the Tire gem was great.
- Good Practice
- Hijack Apple's speech files to get a cool British accent
- Have node execute
say
commands in a sub shell to get the robot talking
- The robot was talking over himself
- Quick touch on the async library and managing control flows with node
- Show stupid binding in coffeescript
- XMPP adapter for Hubot for use with a web interface
- Jarvis talks to his "Brain" which is a SQLite with a rails server on top
- uses XMPP
- Why Rails? Because the Tire gem is amazeballs
- The "brain" responds with an "executable" object which node will then parse the json and execute the function contained in the object.
- Still uses is lesser Redis brain for simple things
- I would like to build a more robust web interface for him so that he can respond with visuals as well as audio and text
I suppose I should touch on writing scripts for Hubot