Skip to content

Commit

Permalink
chore(language-translator): remove language translator v2 as it is no…
Browse files Browse the repository at this point in the history
… longer available as a service
  • Loading branch information
dpopp07 committed Dec 6, 2018
1 parent 62ce280 commit eca8843
Show file tree
Hide file tree
Showing 7 changed files with 3 additions and 1,244 deletions.
50 changes: 2 additions & 48 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ Node.js client library to use the Watson APIs.
* [Assistant v2](#assistant-v2)
* [Assistant v1](#assistant-v1)
* [Discovery](#discovery)
* [Language Translator v3](#language-translator-v3)
* [Language Translator v2](#language-translator-v2)
* [Language Translator](#language-translator)
* [Natural Language Classifier](#natural-language-classifier)
* [Natural Language Understanding](#natural-language-understanding)
* [Personality Insights](#personality-insights)
Expand Down Expand Up @@ -415,7 +414,7 @@ discovery.query(

```

### Language Translator v3
### Language Translator

Translate text from one language to another or idenfity a language using the [Language Translator][language_translator] service.

Expand Down Expand Up @@ -457,51 +456,6 @@ languageTranslator.identify(
);
```
### Language Translator v2
**Note:** Language Translator v3 is now available. The v2 Language Translator API will no longer be available after July 31, 2018. To take advantage of the latest service enhancements, migrate to the v3 API. View the [Migrating to Language Translator v3](https://console.bluemix.net/docs/services/language-translator/migrating.html) page for more information.
Translate text from one language to another or idenfity a language using the [Language Translator][language_translator] service.
```javascript
var LanguageTranslatorV2 = require('watson-developer-cloud/language-translator/v2');

var languageTranslator = new LanguageTranslatorV2({
username: '<username>',
password: '<password>',
url: 'https://gateway.watsonplatform.net/language-translator/api/'
});

languageTranslator.translate(
{
text: 'A sentence must have a verb',
source: 'en',
target: 'es'
},
function(err, translation) {
if (err) {
console.log('error:', err);
} else {
console.log(JSON.stringify(translation, null, 2));
}
);

languageTranslator.identify(
{
text:
'The language translator service takes text input and identifies the language used.'
},
function(err, language) {
if (err) {
console.log('error:', err);
} else {
console.log(JSON.stringify(language, null, 2));
}
}
);
```
### Natural Language Classifier
Use [Natural Language Classifier](https://console.bluemix.net/docs/services/natural-language-classifier/getting-started.html) service to create a classifier instance by providing a set of representative strings and a set of one or more correct classes for each as training. Then use the trained classifier to classify your new question for best matching answers or to retrieve next actions for your application.
Expand Down
41 changes: 0 additions & 41 deletions examples/language_translator.v2.js

This file was deleted.

2 changes: 0 additions & 2 deletions index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,6 @@ export import DiscoveryV1 = require('./discovery/v1');

export import DialogV1 = require('./dialog/v1');

export import LanguageTranslatorV2 = require('./language-translator/v2');

export import LanguageTranslatorV3 = require('./language-translator/v3');

export import NaturalLanguageClassifierV1 = require('./natural-language-classifier/v1');
Expand Down
Loading

0 comments on commit eca8843

Please sign in to comment.