You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-3Lines changed: 33 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -18,6 +18,8 @@ APIs and SDKs that use cognitive computing to solve complex problems.
18
18
*[Installation](#installation)
19
19
*[Usage](#usage)
20
20
*[Getting the Service Credentials](#getting-the-service-credentials)
21
+
*[Alchemy Services](#alchemy-services)
22
+
*[Alchemy Language](#alchemy-language)
21
23
*[IBM Watson Services](#ibm-watson-services)
22
24
*[Authorization](#authorization)
23
25
*[Concept Expansion](#concept-expansion)
@@ -63,9 +65,7 @@ credentials; the wrapper will get them for you by looking at the `VCAP_SERVICES`
63
65
environment variable.
64
66
65
67
### Getting the Service Credentials
66
-
The credentials for the services are stored in the
67
-
`VCAP_SERVICES` environment variable. To get them, you need
68
-
to first create and bind the service to your application.
68
+
The credentials for the services are stored in the `VCAP_SERVICES` environment variable. To get them, you need to first create and bind the service to your application.
69
69
70
70
There are two ways to get the credentials. You can use Bluemix to access your
71
71
app and view the `VCAP_SERVICES` there or you can run:
@@ -95,6 +95,34 @@ Example output:
95
95
96
96
You need to copy `username` and `password`.
97
97
98
+
For Alchemy you only need an `api_key`, you can register for one [here](http://www.alchemyapi.com/api/register.html).
99
+
100
+
## Alchemy APIs
101
+
102
+
### Alchemy Language
103
+
[Alchemy Language](alchemy_language) offers 12 API functions as part of its text analysis service, each of which uses sophisticated natural language processing techniques to analyze your content and add high-level semantic information.
104
+
105
+
Use the [Sentiment Analysis](sentiment_analysis) endpoint to identify positive/negative sentiment within a sample text document.
106
+
107
+
```javascript
108
+
var watson =require('watson-developer-cloud');
109
+
110
+
var alchemy_language =watson.alchemy_language({
111
+
api_key:'<api_key>'
112
+
});
113
+
114
+
var params = {
115
+
text:'IBM Watson won the Jeopardy television show hosted by Alex Trebek'
116
+
};
117
+
118
+
alchemy_language.sentiment(params, function (err, response) {
119
+
if (err)
120
+
console.log('error:', err);
121
+
else
122
+
console.log(JSON.stringify(response, null, 2));
123
+
});
124
+
```
125
+
98
126
## IBM Watson Services
99
127
The Watson Developer Cloud offers a variety of services for building cognitive
100
128
apps.
@@ -568,6 +596,8 @@ See [CONTRIBUTING](https://github.com/watson-developer-cloud/nodejs-wrapper/blob
0 commit comments