Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: master
Fetching contributors…

Cannot retrieve contributors at this time

executable file 60 lines (37 sloc) 1.105 kB
#!/usr/bin/node
var hyve = require('../src/hyve.core.js')
require('../src/hyve.twitter.js')
require('../src/hyve.facebook.js')
hyve.queue_enable = false
hyve.recall_enable = false
console.log('Starting Stream')
// examples:
// hyve.friends.stream(callback, [services])
// hyve.search.stream(query, callback, [services])
// hyve.search.popular(query, callback, [services])
var stream_limit = 0;
hyve.search.stream('bccc2012', function(data){
var sentence = data.text;
var words = sentence.toLowerCase().replace(/[^a-z ]/g,'').replace(/ */g,' ').split(' ');
var b = 0;
for (var i in words) {
console.log ( words[i]);
if (b == 4) {
console.log ('\n');
break;
}
b+=1;
}
if (stream_limit == 3)
hyve.stop();
return;
stream_limit+=1;
}, ['twitter','facebook']);
function syllable_count(word) {
if(word == '') return 0;
if(word.length <= 3) return 1;
word = word.replace(/(?:[^laeiouy]es|ed|[^laeiouy]e)$/, '');
word = word.replace(/^y/, '');
var matches = word.match(/[aeiouy]{1,2}/g);
return matches ? matches.length : 0
}
Jump to Line
Something went wrong with that request. Please try again.