--- /dev/null
+fs = require 'fs'
+async = require 'async'
+
+dict = {}
+
+async.waterfall [
+ (callback) -> async.parallel [
+ (callback) -> fs.readFile '/etc/dictionaries-common/words', 'utf8', callback
+ (callback) -> fs.readFile 'my_log_words', 'utf8', callback
+ ], callback
+ ([dictionary, log_words], callback) ->
+ for word in dictionary.split(/\n/)
+ dict[word] = true
+ good = []
+ for line in log_words.split(/\n/)
+ word = line[line.lastIndexOf(' ')+1..]
+ if dict[word]
+ good.push word
+ if good.length == 8836
+ return callback(null, good)
+ callback 'could find enough real words'
+ (words, callback) ->
+ for word in words
+ console.log word
+ callback()
+ ], (err) ->
+ if err
+ console.log err
+ process.exit 1
+ process.exit 0