Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var socket = io();
- var actionItems = []
- var beginTakingAction = false
- var strOut;
- socket.on('transcript', function(x) {
- var div = $('div.transcription')
- div.html(x);
- console.log("transcript " + x);
- if (!scrolling) {
- div.scrollTop(div[0].scrollHeight);
- }
- })
- socket.on('action', function(x) {
- console.log('sending action',x);
- actionItems.push(x)
- $('div.action').html(actionItems[actionItems.length-1]);
- })
- socket.on('sentiment', function(x) {
- sentimentChart.update(x)
- })
- socket.on('nlp', function(x) {
- wordLengthDistChart.update(x.wordLenghDist);
- posTagDistChart.update(x.posTagDist);
- })
- socket.on('keywords', function(x) {
- keywordChart.update(x)
- })
- socket.on('status', function(status) {
- $('div.status').html("status: " + status);
- if (status == "connected") {
- sentimentChart.reset()
- keywordChart.reset()
- wordLengthDistChart.reset()
- posTagDistChart.reset()
- $('div.transcription').html('');
- }
- })
Add Comment
Please, Sign In to add comment