Skip to content

Commit f7f261e

Browse files
committed
Merge pull request #27 from fhasanaj/RCB-305
Sentiment example now shows doc-level and entity-level results
2 parents f79233a + 5414ca4 commit f7f261e

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

examples/sentiment.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ var api = new Api(args.key, args.url);
2222
var endpoint = "sentiment";
2323

2424
api.parameters.documentFile = file.path;
25+
api.parameters.language = "eng";
2526

2627
api.rosette(endpoint, function(err, res){
2728
if(err){

lib/parameters.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ parameters.prototype.loadParams = function() {
105105
*@param {file} filePath - The file path from which the desired file will be loaded
106106
*/
107107
parameters.prototype.loadFile = function(filePath) {
108-
var str = fs.readFileSync(filePath, "base64");
108+
var str = fs.readFileSync(filePath, "utf8");
109109

110110
this.content = str;
111111
this.contentType = RosetteConstants.dataFormat.UNSPECIFIED;

0 commit comments

Comments
 (0)