Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ APIs and SDKs that use cognitive computing to solve complex problems.
* [Conversation](#conversation)
* [Dialog](#dialog)
* [Document Conversion](#document-conversion)
* [Language Translator](#language-translator)
* [Language Translation](#language-translation)
* [Natural Language Classifier](#natural-language-classifier)
* [Personality Insights](#personality-insights)
* [Relationship Extraction](#relationship-extraction)
Expand Down Expand Up @@ -302,12 +302,12 @@ Answers htmlToAnswers = service.convertDocumentToAnswer(doc).execute();
System.out.println(htmlToAnswers);
```

### Language Translator
### Language Translation
Select a domain, then identify or select the language of text, and then translate the text from one supported language to another.
Example: Translate 'hello' from English to Spanish using the [Language Translator][language_translator] service.
Example: Translate 'hello' from English to Spanish using the [Language Translator][language_translation] service.

```java
LanguageTranslator service = new LanguageTranslator();
LanguageTranslator service = new LanguageTranslation();
service.setUsernameAndPassword("<username>", "<password>");

TranslationResult translationResult = service.translate(
Expand Down Expand Up @@ -619,7 +619,7 @@ See [CONTRIBUTING.md](.github/CONTRIBUTING.md).
[personality_insights]: http://www.ibm.com/watson/developercloud/doc/personality-insights/
[document_conversion]: http://www.ibm.com/watson/developercloud/doc/document-conversion/
[relationship_extraction]: http://www.ibm.com/watson/developercloud/doc/sireapi/
[language_translator]: http://www.ibm.com/watson/developercloud/doc/language-translation/
[language_translation]: http://www.ibm.com/watson/developercloud/doc/language-translation/
[visual_recognition]: http://www.ibm.com/watson/developercloud/doc/visual-recognition/
[tradeoff_analytics]: http://www.ibm.com/watson/developercloud/doc/tradeoff-analytics/
[text_to_speech]: http://www.ibm.com/watson/developercloud/doc/text-to-speech/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,10 @@
*/
package com.ibm.watson.developer_cloud.speech_to_text.v1;

import java.io.FileNotFoundException;

import javax.sound.sampled.AudioFormat;
import javax.sound.sampled.AudioInputStream;
import javax.sound.sampled.AudioSystem;
import javax.sound.sampled.DataLine;
import javax.sound.sampled.LineUnavailableException;
import javax.sound.sampled.TargetDataLine;

import com.ibm.watson.developer_cloud.http.HttpMediaType;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@
* The response payload from the Conversation service's message API call
* {@link ConversationService#message(String, MessageRequest)}.
*
* @see <a href="http://www.ibm.com/watson/developercloud/conversation.html">
* http://www.ibm.com/watson/developercloud/conversation.html</a>
* @see <a href="http://www.ibm.com/watson/developercloud/conversation.html"> http://www.ibm.com/
* watson/developercloud/conversation.html</a>
*/
public class MessageResponse extends GenericModel {
private static final String TEXT = "text";
Expand Down Expand Up @@ -243,6 +243,7 @@ public void setOutput(Map<String, Object> output) {
*
* @return an array of strings which is to be displayed/returned to the end user
*/
@SuppressWarnings("unchecked")
public List<String> getText() {
if (output != null && output.containsKey(TEXT)) {
List<?> text = (List<?>) output.get(TEXT);
Expand All @@ -257,7 +258,8 @@ public List<String> getText() {
* A convenience method for getting the text property from the output object. The text property is
* an array of strings. This convenience class concatenates the array, separating each entry with
* the separator string.
*
*
* @param separator the separator
* @return a concatenation of the strings in the output array, with each string separated by the
* separator string
*/
Expand All @@ -269,14 +271,29 @@ public String getTextConcatenated(String separator) {
return null;
}

/**
* Gets the input.
*
* @return the input
*/
public Map<String, Object> getInput() {
return input;
}

/**
* Sets the input.
*
* @param input the input
*/
public void setInput(Map<String, Object> input) {
this.input = input;
}

/**
* Gets the input text.
*
* @return the input text
*/
public String getInputText() {
if (this.input != null && this.input.containsKey(TEXT)) {
return this.input.get(TEXT).toString();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,11 @@
* The IBM Watson Language Translator service translate text from one language to another and
* identifies the language in which text is written.
*
* <p>This class is deprecated. Use {@link com.ibm.watson.developer_cloud.language_translator.v2.LanguageTranslator}
* instead.</p>
*
* @version v2
* @see <a href=
* "http://www.ibm.com/watson/developercloud/language-translation.html">
* Language Translator</a>
* Language translation</a>
*/
@Deprecated
public class LanguageTranslation extends WatsonService {

private static final String LANGUAGES = "languages";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,13 @@
package com.ibm.watson.developer_cloud.language_translation.v2.model;

import java.io.File;

import com.ibm.watson.developer_cloud.language_translation.v2.LanguageTranslation;

/**
* Model Options when using the {@link LanguageTranslation#createModel(CreateModelOptions)} method.
*
* <p>This class is deprecated. Use the {@code language_translator} classes instead.</p>
*/
@Deprecated
public class CreateModelOptions {

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
/**
* Identifiable language used by the {@link LanguageTranslation} service.
*
* <p>This class is deprecated. Use the {@code language_translator} classes instead.</p>
*
*/
@Deprecated
public class IdentifiableLanguage extends GenericModel {

private final String language;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,7 @@
/**
* Language detected by the {@link LanguageTranslation} service.
*
* <p>This class is deprecated. Use the {@code language_translator} classes instead.</p>
*
*/
@Deprecated
public class IdentifiedLanguage extends IdentifiableLanguage {

/** The confidence. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,21 @@

/**
* The languages available in {@link LanguageTranslation}.
*
* <p>This class is deprecated. Use the {@code language_translator} classes instead.</p>
*/
@Deprecated
public enum Language {

/** arabic. */
ARABIC("ar"),
/** english. */
ENGLISH("en"),
/** spanish. */
SPANISH("es"),
/** french. */
FRENCH("fr"),
/** italian. */
ITALIAN("it"),
/** portuguese. */
PORTUGUESE("pt");

/** english. */
ENGLISH("en"),
/** spanish. */
SPANISH("es"),
/** french. */
FRENCH("fr"),
/** italian. */
ITALIAN("it"),
/** portuguese. */
PORTUGUESE("pt");
/** language. */
String language;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,7 @@
/**
* The Translation result used as POJO by the {@link LanguageTranslation}.
*
* <p>This class is deprecated. Use the {@code language_translator} classes instead.</p>
*
*/
@Deprecated
public class Translation extends GenericModel {

/** The translation. */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,17 @@
/**
* Language Model used by the {@link TranslationModel}.
*
* <p>This class is deprecated. Use the {@code language_translator} classes instead.</p>
*/
@Deprecated
public class TranslationModel extends GenericModel {

/**
* The Enum Status.
*/
public enum Status {

/** The available. */
AVAILABLE,
/** The error. */
ERROR,
/** The training. */
TRAINING;
AVAILABLE, /** The error. */
ERROR, /** The training. */
TRAINING;
}

@SerializedName("base_model_id")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,16 @@
*/
package com.ibm.watson.developer_cloud.language_translation.v2.model;

import java.util.List;

import com.ibm.watson.developer_cloud.language_translation.v2.LanguageTranslation;
import com.ibm.watson.developer_cloud.service.model.GenericModel;

import java.util.List;


/**
* {@link TranslationModel} list used by the {@link LanguageTranslation} service.
*
* <p>This class is deprecated. Use the {@code language_translator} classes instead.</p>
*/
@Deprecated
public class TranslationModels extends GenericModel {

private List<TranslationModel> models;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
* Translation results from calling the translate method. Contains the word count, character count
* and the {@link Translation} list
*
* <p>This class is deprecated. Use the {@code language_translator} classes instead.</p>
*/
@Deprecated
public class TranslationResult extends GenericModel {

@SerializedName("character_count")
Expand Down
Loading