   robot.respond /where( i|')s( the)? (sadness|stress)\??/i, (msg) ->
     # responds in the current channel
     msg.send getSadChannels(10)
+
+module.exports = (robot) ->
+  loaded = _.once(->
+    console.log "starting hubot-sentiment..."
+    start robot
+    return
+  )
+  if _.isEmpty(robot.brain.data) or _.isEmpty(robot.brain.data._private)
+    robot.brain.once "loaded", loaded
+    setTimeout loaded, INIT_TIMEOUT
+  else
+    loaded()
+  return
+

#
sentiment = require 'sentiment'
_ = require 'underscore'

module.exports = (robot) ->
  # helper method to get the week of the year in numeric form
  getWeekOfYear = (dateObj = new Date()) ->
    onejan = new Date(dateObj.getFullYear(), 0, 1)

#   Michi Kono
#   Will Barksdale
#
# Configuration:
#   HUBOT_SENTIMENT_BRAIN_INIT_TIMEOUT=N - wait for N milliseconds for brain data to load from redis. (default 10000)
# Notes:
#   Requires underscore and sentiment NPM modules
#
