watson-developer-cloud / tone-analyzer-nodejs

Sample Node.js Application for the IBM Tone Analyzer Service
https://tone-analyzer-demo.ng.bluemix.net/
Apache License 2.0
453 stars 273 forks source link

edit names of tone for spanish #80

Closed johnfelipe closed 8 years ago

johnfelipe commented 8 years ago

sudo nano /home/felipe/tone-analyzer-nodejs/public/js/components/App.js

      score: 0,
      tone_id: 'Anger',
      tone_name: 'Enojo',
      tone_category_id: 'emotion_tone',
      tone_category_name: 'Emotion Tone'

But not working How solved?

herchu commented 8 years ago

Felipe, you can use a http header Accept-Language: es to get the tone names in Spanish directly from the APIs. I guess this is what you need (not too clear from your question).

johnfelipe commented 8 years ago

where can find that? Or where put in tone-analyzer-nodejs demo?

johnfelipe commented 8 years ago

Where add or edit 'Accept-Language: es'?

johnfelipe commented 8 years ago

me again where put Accept-Language: es

germanattanasio commented 8 years ago
// Create the service wrapper
var toneAnalyzer = watson.tone_analyzer({
  url: 'https://gateway.watsonplatform.net/tone-analyzer/api/',
  username: '<username>',
  password: '<password>',
  version_date: '2016-05-19',
  version: 'v3',
  headers: {
   'Accept-Language': 'es'
  }
});
johnfelipe commented 8 years ago
var toneAnalyzer = watson.tone_analyzer({
  url: 'https://gateway.watsonplatform.net/tone-analyzer/api/',
  username: 'e9f75e44-491a-47e1-bbe3-5a9889366758',
  password: 'my password',
  version_date: '2016-05-19',
  version: 'v3',
  headers: {
   'Accept-Language': 'es'
  }
});

npm install and pm2 reload server.js

and not work

germanattanasio commented 8 years ago

I don't know what pm2 is and I'm sure it's not part of this sample.

On Mon, Jun 20, 2016 at 12:42 PM felipe notifications@github.com wrote:

var toneAnalyzer = watson.tone_analyzer({ url: 'https://gateway.watsonplatform.net/tone-analyzer/api/', username: 'e9f75e44-491a-47e1-bbe3-5a9889366758', password: 'my password', version_date: '2016-05-19', version: 'v3', headers: { 'Accept-Language': 'es' } });

npm install and pm2 reload server.js

and not work

— You are receiving this because you were assigned.

Reply to this email directly, view it on GitHub https://github.com/watson-developer-cloud/tone-analyzer-nodejs/issues/80#issuecomment-227198319, or mute the thread https://github.com/notifications/unsubscribe/AATHReCDRq1dzCruGmDcxN6f9t37kiKHks5qNsL-gaJpZM4I3r-h .

johnfelipe commented 8 years ago

pm2 is same like npm server.js

johnfelipe commented 8 years ago
// Create the service wrapper
var toneAnalyzer = watson.tone_analyzer({
  url: 'https://gateway.watsonplatform.net/tone-analyzer/api/',
  username: 'e9f75e44-491a-47e1-bbe3-5a9889366758',
  password: 'xxxxxxxx',
  version_date: '2016-05-19',
  version: 'v3',
  headers: {
   'Accept-Language': 'es'
  }
});

not working

johnfelipe commented 8 years ago

http://181.135.20.181:3012/ is not working git pull and nothing yet to spanish

johnfelipe commented 8 years ago
var toneAnalyzer = watson.tone_analyzer({
  url: 'https://gateway.watsonplatform.net/tone-analyzer/api/',
  username: 'xxxxx',
  password: 'xxxxxx',
  version_date: '2016-05-19',
  version: 'v3',
  headers: {
   'Accept-Language': 'es'
  }
});

Is not working http://181.135.20.181:3012/

Pls help

kognate commented 8 years ago

Can you give a little more information about what exactly is not working? If your getting error messages can you attach them with the issue?

johnfelipe commented 8 years ago

is not error only i cant see in spanish, pls put a spanish text in Tu Propio Texto

http://181.135.20.181:3012/

analizador

germanattanasio commented 8 years ago

The node-sdk version that was used here was a little bit old. I updated the dependency in the package.json and was able to get Spanish results from the API.

On the other hand, this demo doesn't support Spanish. Parts of the UI need the emotions/tones to be in English.

johnfelipe commented 8 years ago

version_date: '2016-05-19', version: 'v3', headers: { 'Accept-Language': 'es'

i pull, update

analizadordos

is not working

germanattanasio commented 8 years ago

As I said in my comment above. The demo doesn't work in English. The API does.