| changeset 802 | a9fa8dbfb8f0 |
| parent 801 | 9638278530e0 |
| child 822 | df9c00cddfe1 |
| 801:9638278530e0 | 802:a9fa8dbfb8f0 |
|---|---|
100 stopWords : [ |
100 stopWords : [ |
101 'aussi', 'and', 'avec', 'aux', 'bien', 'car', 'cette', 'comme', 'dans', 'donc', 'des', 'elle', 'encore', 'est', |
101 'aussi', 'and', 'avec', 'aux', 'bien', 'car', 'cette', 'comme', 'dans', 'donc', 'des', 'elle', 'encore', 'est', |
102 'être', 'eux', 'faire', 'fait', 'http', 'ici', 'ils', 'les', 'leur', 'leurs', 'mais', 'mes', 'même', 'mon', 'notre', |
102 'être', 'eux', 'faire', 'fait', 'http', 'ici', 'ils', 'les', 'leur', 'leurs', 'mais', 'mes', 'même', 'mon', 'notre', |
103 'non', 'nos', 'nous', 'ont', 'par', 'pas', 'peu', 'peut', 'plus', 'pour', 'que', 'qui', 'ses' ,'son', 'sont', 'sur', |
103 'non', 'nos', 'nous', 'ont', 'par', 'pas', 'peu', 'peut', 'plus', 'pour', 'que', 'qui', 'ses' ,'son', 'sont', 'sur', |
104 'tes', 'très', 'the', 'ton', 'tous', 'tout', 'une', 'votre', 'vos', 'vous' |
104 'tes', 'très', 'the', 'ton', 'tous', 'tout', 'une', 'votre', 'vos', 'vous' |
105 ], |
105 ] |
106 } |
106 } |
107 |
107 |
108 function getTweets(options) { |
108 function getTweets(options) { |
109 |
109 |
110 function getTweetUrl(url) { |
110 function getTweetUrl(url) { |
216 _lastpos = _start + _m.length; |
216 _lastpos = _start + _m.length; |
217 tweet.entities.push({ |
217 tweet.entities.push({ |
218 "text" : _m, |
218 "text" : _m, |
219 "start" : _start, |
219 "start" : _start, |
220 "end" : _lastpos, |
220 "end" : _lastpos, |
221 "link" :'<a href="http://twitter.com/' + _m.substr(1) + '" onclick="filtrerTexte(\'' + _m + '\'); return false;" target="_blank">', |
221 "link" :'<a href="http://twitter.com/' + _m.substr(1) + '" onclick="filtrerTexte(\'' + _m + '\'); return false;" target="_blank">' |
222 }); |
222 }); |
223 } |
223 } |
224 } |
224 } |
225 |
225 |
226 var _hashes = tweet.text.match(/([^&]|^)#[^\s,.!?=#@&;()]+/gm), |
226 var _hashes = tweet.text.match(/([^&]|^)#[^\s,.!?=#@&;()]+/gm), |
233 _lastpos = _start + _h.length; |
233 _lastpos = _start + _h.length; |
234 tweet.entities.push({ |
234 tweet.entities.push({ |
235 "text" : _h, |
235 "text" : _h, |
236 "start" : _start, |
236 "start" : _start, |
237 "end" : _lastpos, |
237 "end" : _lastpos, |
238 "link" :'<a href="http://twitter.com/search?q=' + encodeURIComponent(_h) + '" onclick="filtrerTexte(\'' + _.escape(_h) + '\'); return false;" target="_blank">', |
238 "link" :'<a href="http://twitter.com/search?q=' + encodeURIComponent(_h) + '" onclick="filtrerTexte(\'' + _.escape(_h) + '\'); return false;" target="_blank">' |
239 }); |
239 }); |
240 } |
240 } |
241 } |
241 } |
242 |
242 |
243 var _urls = tweet.text.match(/(www\.|https?:\/\/)[\w./_\-]+/gim), |
243 var _urls = tweet.text.match(/(www\.|https?:\/\/)[\w./_\-]+/gim), |
249 _lastpos = _start + _m.length; |
249 _lastpos = _start + _m.length; |
250 tweet.entities.push({ |
250 tweet.entities.push({ |
251 "text" : _m, |
251 "text" : _m, |
252 "start" : _start, |
252 "start" : _start, |
253 "end" : _lastpos, |
253 "end" : _lastpos, |
254 "link" :'<a href="' + _m + '" target="_blank">', |
254 "link" :'<a href="' + _m + '" target="_blank">' |
255 }); |
255 }); |
256 } |
256 } |
257 } |
257 } |
258 tweet.date_value = Date.parse(tweet.created_at.replace(/(\+|-)/,'UTC$1')); |
258 tweet.date_value = Date.parse(tweet.created_at.replace(/(\+|-)/,'UTC$1')); |
259 |
259 |
797 var tab = _(twCx.globalWords).chain() |
797 var tab = _(twCx.globalWords).chain() |
798 .map(function(v, k) { |
798 .map(function(v, k) { |
799 return { |
799 return { |
800 "word": k, |
800 "word": k, |
801 "freq" : v.freq, |
801 "freq" : v.freq, |
802 "annotations" : v.annotations, |
802 "annotations" : v.annotations |
803 }; |
803 }; |
804 }).filter(function(v) { |
804 }).filter(function(v) { |
805 return v.freq > 1; |
805 return v.freq > 1; |
806 }).value(); |
806 }).value(); |
807 |
807 |