london underground live sentiment analysis
1.0.0
각 런던 지하 라인을 언급하는 최근 트위터 피드를 분석하는 노드 모듈과 HP Idol OnDemand 감정 분석을 사용하여 각 라인 전체가 긍정적이거나 니트 트윗을받는 것보다 더 큰 영향을 미칩니다.
## usage ### Inatall
npm install git://github.com/Lissy93/london-underground-live-sentiment-analysis.git
var tflSentimentAnalysis = require('tfl-sentiment-analysis');
https://api-portal.tfl.gov.uk/signup에서 API 키에 가입하고 http://www.idolondemand.com/signup.html의 hp ondemand 키도 무료입니다. 이와 유사한 JSON을 만듭니다.
exports.HP_API_KEY = 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';
exports.TWITTER_API = {
CONSUMER_KEY : "xxxxxxxxxxxxxxxxxxxxxxxxx",
CONSUMER_SECRET : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
ACCESS_TOKEN_KEY : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx",
ACCESS_TOKEN_SECRET : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
};
다른 API 키와 함께 별도의 파일에 넣고 .gitignore에 파일을 추가해야합니다.
tflSentimentAnalysis . fetchTflSentiments ( keys , function ( results ) {
console . log ( results ) ; // Do whatever with the results
} ) ;
[ { line: 'DLR', sentiments: 'neutral', score: 0 },
{ line: 'WaterlooCity', sentiments: 'neutral', score: 0 },
{ line: 'Victoria',
sentiments: 'positive',
score: 0.5685799620527161 },
{ line: 'Picadilly', sentiments: 'neutral', score: 0 },
{ line: 'Bakerloo', sentiments: 'neutral', score: 0 },
{ line: 'Central', sentiments: 'neutral', score: 0 },
{ line: 'Overground', sentiments: 'neutral', score: 0 },
{ line: 'Jubile', sentiments: 'neutral', score: 0 },
{ line: 'District',
sentiments: 'negative',
score: -0.8177321332492695 },
{ line: 'Metropolitan', sentiments: 'neutral', score: 0 },
{ line: 'Northen', sentiments: 'positive', score: 0.48272937292926293 },
{ line: 'Hammersmith', sentiments: 'neutral', score: 0 },
{ line: 'Circle',
sentiments: 'negative',
score: -0.44023113875144726 } ]