$ git clone https://github.com/katsube/comprehend.detectSentiment.git
$ cd comprehend.detectSentiment
$ npm install
またAWSのマネジメントコンソールでIAMを作成し、アクセスキーIDとシークレットを「.env」という名前のファイルに保存してください(詳細は解説ページをご覧ください)
簡単なサンプルを実行します。
$ node sample.js
dataフォルダ内にある小説などの各種ファイルを1行ずつ分析にかけます。
$ node analytics.js | sort -n