TextDocumentInput Class
- java.
lang. Object - com.
azure. ai. textanalytics. models. TextDocumentInput
- com.
public final class TextDocumentInput
Contains an input document to be analyzed by the service.
Constructor Summary
| Constructor | Description |
|---|---|
| TextDocumentInput(String id, String text) |
Creates a |
Method Summary
| Modifier and Type | Method and Description |
|---|---|
| String |
getId()
Get the id property: A unique, non-empty document identifier. |
| String |
getLanguage()
Get the language property: (Optional) This is the 2-letter ISO 639-1 representation of a language. |
| String |
getText()
Get the text property: The document to process. |
|
Text |
setLanguage(String language)
Set the language property: (Optional) This is the 2-letter ISO 639-1 representation of a language. |
| String | toString() |
Methods inherited from java.lang.Object
Constructor Details
TextDocumentInput
public TextDocumentInput(String id, String text)
Creates a TextDocumentInput model that describes the documents.
Parameters:
Method Details
getId
public String getId()
Get the id property: A unique, non-empty document identifier.
Returns:
getLanguage
public String getLanguage()
Get the language property: (Optional) This is the 2-letter ISO 639-1 representation of a language. For example, use "en" for English; "es" for Spanish etc. If not set, use "en" for English as default.
Returns:
getText
public String getText()
Get the text property: The document to process.
Returns:
setLanguage
public TextDocumentInput setLanguage(String language)
Set the language property: (Optional) This is the 2-letter ISO 639-1 representation of a language. For example, use "en" for English; "es" for Spanish etc. If not set, uses "en" for English as default. Per-document language will take precedence over whole batch language. See Language for supported languages in Language API.
Parameters:
Returns:
TextDocumentInput itself.toString
public String toString()
Overrides:
TextDocumentInput.toString()