Edge Operations
This section contains the Edge specific setup and operations.
Building the EdgeLanguageWeaverClient
Using default configuration:
try (EdgeLanguageWeaverClient edgeLanguageWeaverClient = new EdgeLanguageWeaverClient()
.build()) {
// perform requests
}
Note
The default setup is the following:
- API credentials loaded from environment variables
- Default retry mechanism (retry up to 3 times, with a delay of 5 seconds)
- Using http://localhost:8001 url
Using custom configuration:
ClientConfiguration clientConfiguration = new ClientConfiguration()
.setCredentialsConfiguration(new CredentialsConfiguration("clientId"))
.setRetryConfiguration(new RetryConfiguration()
.setAttempts(3)
.setDelay(5)
.setUnit(TimeUnit.SECONDS));
try (EdgeLanguageWeaverClient edgeLanguageWeaverClient = new EdgeLanguageWeaverClient()
.withConfigurations(clientConfiguration)
.setOverwriteUrl("https://customurl.com")
.build()) {
// perform requests
}
See API credentials and ClientConfiguration setup.
See API URL setup.
Get all Language Pairs
By using the getEdgeLanguagePairs method from EdgeLanguageWeaverClient, the list of available language pairs will be returned, corresponding to the given client identifier. These will be used for translation requests.
try (EdgeLanguageWeaverClient lwClient = new EdgeLanguageWeaverClient().build()) {
final EdgeLanguagePairsResult languagePairsResult = lwClient.getEdgeLanguagePairs();
// handle result
}
See the complete sample on GitHub .
The EdgeLanguagePairsResult object contains the following information:
Name | Type | Description |
---|---|---|
languagePairs |
array | Contains a list of EdgeLanguagePair objects |
The EdgeLanguagePair object contains the following information:
Name | Type | Description |
---|---|---|
languagePairId |
string | Language pair identifier |
sourceLanguage |
string | Full name of source language |
sourceLanguageId |
string | Three letters language code of the source language |
targetLanguage |
string | Full name of target language |
targetLanguageId |
string | Three letters language code of the target language |
model |
string | String representing a unique identifier for the language pair combination sourceLanguageId-targetLanguageId-model. (e.g. Generic) |
platform |
string | Platform on which language pair runs |
technology |
string | Technology type of language pair |
version |
string | Version of the language pair |
memberPairs |
array | Contains a list of MemberPair object |
isChain |
boolean | Indicates if the language pair is a chain |
linguisticOptions |
array | List of available EdgeLinguisticOption as an array |
The MemberPair object contains the following information:
Name | Type | Description |
---|---|---|
languagePairId |
string | Language pair identifier |
sourceLanguage |
string | Full name of source language |
sourceLanguageId |
string | Three letters language code of the source language |
targetLanguage |
string | Full name of target language |
targetLanguageId |
string | Three letters language code of the target language |
model |
string | String representing a unique identifier for the language pair combination sourceLanguageId-targetLanguageId-model. (e.g. Generic) |
platform |
string | Platform on which language pair runs |
technology |
string | Technology type of language pair |
version |
string | Version of the language pair |
The EdgeLinguisticOption object contains the following information:
Name | Type | Description |
---|---|---|
id |
string | Linguistic option identifier |
systemDefault |
string | System default linguistic option |
values |
string array | Available values for the current linguistic option |
Get all Linguistic Options for a Language Pair
By using the getEdgeLinguisticOptions method from EdgeLanguageWeaverClient, the list of available linguistic options of a specific language pair will be returned, corresponding to the given client identifier.
try (EdgeLanguageWeaverClient lwClient = new EdgeLanguageWeaverClient().build()) {
EdgeGetLinguisticOptionsRequest edgeGetLinguisticOptionsRequest = new EdgeGetLinguisticOptionsRequest()
.setSourceLanguageId("chi")
.setTargetLanguageId("eng")
.setModel("Generic");
// .setPlatform("SRV")
// .setTechnology("TNMV")
final EdgeLinguisticOptionsResult edgeLinguisticOptionsResult = lwClient.getEdgeLinguisticOptions(edgeGetLinguisticOptionsRequest);
// handle result
}
See the complete sample on GitHub.
The EdgeGetLinguisticOptionsRequest object contains the following information:
Name | Type | Mandatory | Default | Description |
---|---|---|---|---|
sourceLanguageId |
string | yes | Three letters language code of the source language | |
targetLanguageId |
string | yes | Three letters language code of the target language | |
model |
string | yes | A string representing a unique identifier for the language pair combination sourceLanguageId-targetLanguageId-model. (e.g. generic) | |
platform |
string | no | Platform on which language pair runs | |
technology |
string | no | Technology type of language pair |
The EdgeGetLinguisticOptionsRequest object can be obtained from an existing EdgeLanguagePair object as well using the toGetLinguisticOptionsRequest() method:
EdgeGetLinguisticOptionsRequest edgeGetLinguisticOptionsRequest = languagePair.toGetLinguisticOptionsRequest();
The EdgeLinguisticOptionsResult object contains the following information:
Name | Type | Description |
---|---|---|
linguisticOptions |
array | List of linguistic options available for the requested language pair |
The EdgeLinguisticOption object contains the following information:
Name | Type | Description |
---|---|---|
id |
string | Linguistic option identifier |
systemDefault |
string | System default linguistic option |
values |
string array | Available values for the current linguistic option |
Get all Dictionaries
By using the getEdgeDictionaries method from EdgeLanguageWeaverClient, the list of available dictionaries will be returned, corresponding to the given client identifier. These can be used for translation requests.
try (EdgeLanguageWeaverClient lwClient = new EdgeLanguageWeaverClient().build()) {
final EdgeDictionariesResult dictionariesResult = lwClient.getEdgeDictionaries(1);
// handle result
}
See the complete sample on GitHub .
The getEdgeDictionaries method has the following parameters:
Name | Type | Mandatory | Default | Description |
---|---|---|---|---|
pageNumber |
number | yes | Number specifying the requested page number | |
pageSize |
number | no | 100 | Number specifying the requested page size |
The EdgeDictionariesResult object contains the following information:
Name | Type | Description |
---|---|---|
dictionaries |
array | Contains a list of EdgeDictionary objects |
pageNumber |
long | Page number |
pageSize |
long | Number of dictionaries returned per page |
totalPages |
long | Total number of pages available |
totalCount |
long | Total number of dictionaries |
The EdgeDictionary object contains the following information:
Name | Type | Description |
---|---|---|
dictionaryId |
string | Dictionary identifier |
sourceLanguageId |
string | Three letters language code of the source language |
targetLanguageId |
string | Three letters language code of the target language |
Translations
Perform a Text Translation
The translateText method from EdgeLanguageWeaverClient, performs a text translation using a required EdgeTranslateTextRequest object.
try (EdgeLanguageWeaverClient lwClient = new EdgeLanguageWeaverClient().build()) {
EdgeTranslateTextRequest translateTextRequest = new EdgeTranslateTextRequest()
.setLanguagePairId("EngFra_Generic_SRV_TNMV_8_5_x_1")
.addInput("The weather is wonderful today!")
.setInputFormat(Format.PLAIN)
.addDictionary("DictionaryName1")
.addDictionary("DictionaryName2");
final EdgeTranslationTextResult translateTextResult = lwClient.translateText(translateTextRequest);
// handle result
}
See the complete sample on GitHub .
The EdgeTranslateTextRequest object contains the following information:
Name | Type | Mandatory | Default value | Description |
---|---|---|---|---|
languagePairId |
string | yes | Identifier of language pair or language pair chain to use for translation; e.g., EngFra_Generic_SRV_PBL_7_4_x_1 or ChiEng_Generic_SRV_PBL_7_4_x_1 >> EngFra_Generic_SRV_PBL_7_4_x_1. To automatically detect the source language, use AutXxx, where Xxx is the 3-letter code of the desired target language. The AutXxx pattern cannot be used with language pair chains. |
|
inputFormat |
Format | no | Format of input content (see table of possible input formats) | |
input |
string array | yes | Content to be translated. Input is added using the addInput method. This can be called multiple times in order to perform array translations. | |
dictionaries |
string array | no | empty | A string array containing dictionary ids. Dictionaries are added using the addDictionary method. This can be called multiple times if multiple dictionaries need to be used in a translation. |
outputFormat |
Format | no | Format of output document (see table of possible output formats) | |
title |
string | no | Title of translation job | |
encoding |
string | no | Encoding of input content (see list of supported character encodings) | |
linguisticOptions |
map of strings | no | Map of strings containing pairs of linguistic option name and value. Values are case sensitive. You can only use the linguistic options that are available for that specific language pair. You can see what linguistic options are available for a language pair using this method call: Linguistic Options |
Note
In order to use Linguistic Options feature you must enable it in your account
Text Input formats
Name | Description |
---|---|
HTML |
HTML |
PLAIN |
Plain text (UTF8) |
XLINE |
Plain text, one sentence per line |
TMX |
Translation Memory eXchange |
XLIFF |
XML Localization Interchange File Format |
BCM |
Proprietary format |
XML |
Extensible Markup Language |
SDLXML |
Treats every closing XML tag in the input as the end of a segment. The XML format in contrast does not make this assumption. |
The EdgeTranslationTextResult object contains the following information:
Name | Type | Description |
---|---|---|
languagePairId |
string | Language pair identifier |
translation |
string | Translated content |
Perform a File Translation
The translateFile method from EdgeLanguageWeaverClient, performs a file translation using a required EdgeTranslateFileRequest object.
try (EdgeLanguageWeaverClient lwClient = new EdgeLanguageWeaverClient().build()) {
EdgeTranslateFileRequest translateFileRequest = new EdgeTranslateFileRequest()
.setLanguagePairId("EngFra_Generic_SRV_TNMV_8_5_x_1")
// provide full path to the source file
.setInputFile(Paths.get("java", "src", "main", "resources", "input", "input1.txt").toFile().getAbsolutePath())
.setOutputFile(Paths.get("java", "src", "main", "resources", "output").toFile().getAbsolutePath() + File.separator + "input1-translated.txt")
.setInputFormat(Format.PLAIN)
.addDictionary("DictionaryName1")
.addDictionary("DictionaryName2");
final EdgeTranslationFileResult translateFile = lwClient.translateFile(translateFileRequest);
// handle result if outputFile not specified
}
See the complete sample on GitHub .
The EdgeTranslateFileRequest object contains the following information:
Name | Type | Mandatory | Default value | Description |
---|---|---|---|---|
languagePairId |
string | no* | Identifier of language pair or language pair chain to use for translation; e.g., EngFra_Generic_SRV_PBL_7_4_x_1 or ChiEng_Generic_SRV_PBL_7_4_x_1 >> EngFra_Generic_SRV_PBL_7_4_x_1. To automatically detect the source language, use AutXxx, where Xxx is the 3-letter code of the desired target language. The AutXxx pattern cannot be used with language pair chains. |
|
inputFormat |
Format | no | Format of input content (see table of possible input formats) | |
inputFile |
string | yes | The path for the input file that needs to be translated | |
outputFile |
string | no | The path for the output file that will contain the translated content. If the outputFile is not provided, the translated content will be returned as part of the TranslationFileResult as an InputStream | |
dictionaries |
string array | no | empty | A string array containing dictionary ids. Dictionaries are added using the addDictionary method. This can be called multiple times if multiple dictionaries need to be used in a translation. |
outputFormat |
Format | no | Format of output document (see table of possible output formats) | |
title |
string | no | Title of translation job | |
encoding |
string | no | Encoding of input content (see list of supported character encodings) | |
pdfConverter |
PdfConverter | no | Converter to use for PDF conversions. Choices: Standard to use standard conversion and Abbyy to use ABBYY FineReader for enhanced conversion. If empty, Edge (licensed with ABBYY) will automatically use Abbyy when the source file is a scanned PDF, or if the source language is right-to-left (RTL) script or one of the following: Chinese (Simplified and Traditional), Japanese, Korean, Vietnamese, Thai, Hindi or Burmese; Edge will use standard conversion for all other source languages when the source file is not a scanned PDF. |
|
linguisticOptions |
map of strings | no | Map of strings containing pairs of linguistic option name and value. Values are case sensitive. You can only use the linguistic options that are available for that specific language pair. You can see what linguistic options are available for a language pair using this method call: Linguistic Options |
Note
In order to use Linguistic Options feature you must enable it in your account
Note
- For image input formats, output format is PLAIN text (.txt)
- For EML and MSG input formats, output format is PLAIN text (.txt)
- For PDF input format, output format is DOCX (.docx)
- For all other input formats, output format is the same as the input format
The EdgeTranslationFileResult object contains the following information:
Name | Type | Description |
---|---|---|
languagePairId |
string | Language pair identifier |
fileContent |
InputStream | InputStream representing the translated file content. This is populated when the translated content is not stored in an output file on the disk, based on the outputFile value. |
Perform a Batch File Translation
The translateBatchFile method from EdgeLanguageWeaverClient, performs a batch file translation using a required EdgeTranslateBatchFileRequest object.
try (EdgeLanguageWeaverClient lwClient = new EdgeLanguageWeaverClient().build()) {
EdgeTranslateBatchFileRequest translateFileRequest = new EdgeTranslateBatchFileRequest()
.setLanguagePairId("EngFra_Generic_SRV_TNMV_8_5_x_1")
// provide full path to the input and output folders
.setInputBatchFolderPath(Paths.get("java", "src", "main", "resources", "input").toFile().getAbsolutePath())
.setOutputBatchFolderPath(Paths.get("java", "src", "main", "resources", "output").toFile().getAbsolutePath())
.addDictionary("DictionaryName1")
.addDictionary("DictionaryName2");
lwClient.translateBatchFile(translateFileRequest);
}
See the complete sample on GitHub .
The EdgeTranslateBatchFileRequest object contains the following information:
Name | Type | Mandatory | Default value | Description |
---|---|---|---|---|
languagePairId |
string | no* | Identifier of language pair or language pair chain to use for translation; e.g., EngFra_Generic_SRV_PBL_7_4_x_1 or ChiEng_Generic_SRV_PBL_7_4_x_1 >> EngFra_Generic_SRV_PBL_7_4_x_1. To automatically detect the source language, use AutXxx, where Xxx is the 3-letter code of the desired target language. The AutXxx pattern cannot be used with language pair chains. |
|
inputBatchPath |
string | yes | The path to the folder that contains the input files | |
outputBatchPath |
string | yes | The path to the folder where the corresponding translated files will be added | |
dictionaries |
string array | no | empty | A string array containing dictionary ids. Dictionaries are added using the addDictionary method. This can be called multiple times if multiple dictionaries need to be used in a translation. |
outputFormat |
Format | no | Format of output document (see table of possible output formats) | |
title |
string | no | Title of translation job | |
encoding |
string | no | Encoding of input content (see list of supported character encodings) | |
pdfConverter |
PdfConverter | no | Converter to use for PDF conversions. Choices: Standard to use standard conversion and Abbyy to use ABBYY FineReader for enhanced conversion. If empty, Edge (licensed with ABBYY) will automatically use Abbyy when the source file is a scanned PDF, or if the source language is right-to-left (RTL) script or one of the following: Chinese (Simplified and Traditional), Japanese, Korean, Vietnamese, Thai, Hindi or Burmese; Edge will use standard conversion for all other source languages when the source file is not a scanned PDF. |
|
linguisticOptions |
map of strings | no | Map of strings containing pairs of linguistic option name and value. Values are case sensitive. You can only use the linguistic options that are available for that specific language pair. You can see what linguistic options are available for a language pair using this method call: Linguistic Options |
Note
In order to use Linguistic Options feature you must enable it in your account
Content Insights
Create Content Insights For Existing Translations
The getContentInsightsForTranslations method from EdgeLanguageWeaverClient returns the content insights of an asynchronous translation job. The translation must have been successfully completed first.
try (EdgeLanguageWeaverClient lwClient = new EdgeLanguageWeaverClient().build()) {
EdgeTranslateFileRequest translateFileRequest = new EdgeTranslateFileRequest()
.setLanguagePairId("EngFra_Generic_SRV_TNMV_8_5_x_1")
// provide full path to the source file
.setInputFile(Paths.get("java", "src", "main", "resources", "input", "input1.txt").toFile().getAbsolutePath())
.setOutputFile(Paths.get("java", "src", "main", "resources", "output").toFile().getAbsolutePath() + File.separator + "input1-translated.txt")
.setInputFormat("text/plain")
.addDictionary("DictionaryName1")
.addDictionary("DictionaryName2");
EdgeContentInsightsRequest edgeContentInsightsRequest = new EdgeContentInsightsRequest()
.addTranslationId(lwClient.translateFile(translateFileRequest).getTranslationId());
final EdgeContentInsightsResult edgeContentInsightsResult = lwClient.getContentInsightsForTranslations(edgeContentInsightsRequest);
// handle result
}
See the complete sample on GitHub.
The EdgeContentInsightsRequest object contains the following information:
Name | Type | Description |
---|---|---|
translationId |
string | Translation identifier |
Note
- You can perform content insights for only one file that was already translated. If you want to perform content insights for multiple files, please use CloudLanguageWeaverClient!
The EdgeContentInsightsResult object contains the following information:
Name | Type | Description |
---|---|---|
title |
string | Title of the translation document |
summarization |
EdgeSummarization | Object containing the sentences from the input files that were selected as part of the summary |
The EdgeSummarization object contains the following information:
Name | Type | Description |
---|---|---|
segments |
EdgeSegment array | The array with the sentences from the input files that were selected as part of the summary |
The EdgeSegment object contains the following information:
Name | Type | Description |
---|---|---|
text |
string | Segment of the summarization entry |
score |
float | Score rating the importance of the segment in the summary. 0 is minimum, 1 is maximum. |
Feedback Management
Create Feedback
The createFeedback
method from EdgeLanguageWeaverClient creates a translation feedback using a
required EdgeCreateFeedbackRequest
object.
EdgeCreateFeedbackRequest createFeedbackRequest = new EdgeCreateFeedbackRequest()
.setSourceLanguageId("eng")
.setTargetLanguageId("fra")
.setModel("generic")
.setSourceText("sourceText")
.setTargetText("targetText")
.setSuggestedTranslation("suggestedTranslation")
.setComment(FeedbackComment.SPELLING)
.setApprovalState(ApprovalStatus.APPROVED);
EdgeFeedbackResult feedback = lwClient.createFeedback(createFeedbackRequest);
See the complete feedback samples on GitHub .
The EdgeCreateFeedbackRequest object contains the following information:
Name | Type | Mandatory | Default value | Description |
---|---|---|---|---|
languagePairId |
string | yes | Identifier of the language pair | |
sourceLanguageId |
string | yes* | Three letters language code of the source language | |
targetLanguageId |
string | yes* | Three letters language code of the target language | |
model |
string | yes* | A string representing a unique identifier for the language pair combination sourceLanguageId-targetLanguageId-model. (e.g. generic) | |
sourceText |
string | yes | Text provided to be translated | |
targetText |
string | yes | Translation provided by machine translation | |
suggestedTranslation |
string | yes | Expected translation | |
comments |
array | no | An array of string comments about the translation. For the Edge implementation only a single comment can be assigned to a feedback thus the EdgeCreateFeedbackRequest object features a method setComment which takes as argument either a string or a FeedbackComment enum which compiles some predefined comments. |
|
approvalState |
ApprovalStatus | no | The approval status of the feedback (APPROVED , REJECTED , PENDING ) |
Note
- sourceLanguageId, targetLanguageId and model are mandatory only if languagePairId is not provided.
Name | Value |
---|---|
WORDS_OMISSION |
Words omission |
WORDS_ADDITION |
Words addition |
CAPITALIZATION_PUNCTUATION |
Capitalization, punctuation |
UNINTELLIGIBLE |
Unintelligible |
GRAMMAR |
Grammar |
SPELLING |
Spelling |
WORD_CHOICE |
Word choice |
The EdgeFeedbackResult object contains the following information:
Name | Type | Description |
---|---|---|
feedbackId |
string | Feedback identifier |
languagePairId |
string | Identifier of the language pair |
sourceLanguageId |
string | Three letters language code of the source language |
targetLanguageId |
string | Three letters language code of the target language |
model |
string | A string representing a unique identifier for the language pair combination sourceLanguageId-targetLanguageId-model. (e.g. generic) |
sourceText |
string | Text provided to be translated |
targetText |
string | Translation provided by machine translation |
suggestedTranslation |
string | Expected translation |
comments |
array | An array of string comments about translation |
approvalState |
ApprovalStatus | The approval status of the feedback (APPROVED , REJECTED , PENDING ) |
feedbackAuditData |
AuditData | Object containing details about the lifecycle of the feedback |
approvalAuditData |
AuditData | Object containing details about the lifecycle of the feedback's approval |
The AuditData object contains the following information:
Name | Type | Description |
---|---|---|
createdByUserEmail |
string | The email of the user who created the feedback |
creationDate |
string | Creation date of the feedback |
lastModifiedByUserEmail |
string | The email of the user who last modified the feedback |
lastModifyDate |
string | The date when the feedback was last modified |
For more information about the API, access: Feedback operations.
Update Feedback
The updateFeedback
method from EdgeLanguageWeaverClient updates a translation feedback using a
required EdgeUpdateFeedbackRequest
object.
EdgeUpdateFeedbackRequest edgeUpdateFeedbackRequest = new EdgeUpdateFeedbackRequest()
.setFeedbackId("feedbackId")
.setSuggestedTranslation("new suggested translation")
.setComment(FeedbackComment.CAPITALIZATION_PUNCTUATION);
EdgeFeedbackResult feedback = lwClient.updateFeedback(edgeUpdateFeedbackRequest);
You can also obtain EdgeUpdateFeedbackRequest
from EdgeFeedbackResult
using the toUpdateRequest
method which will transfer the feedback's
updatable information into a new update request.
EdgeUpdateFeedbackRequest edgeUpdateFeedbackRequest = feedback.toUpdateRequest();
See the complete feedback samples on GitHub .
The EdgeUpdateFeedbackRequest object contains the following information:
Name | Type | Mandatory | Default value | Description |
---|---|---|---|---|
feedbackId |
string | yes | The id of the feedback to be updated | |
suggestedTranslation |
string | no | Expected translation | |
comments |
array | no | An array of string comments about the translation. For the Edge implementation only a single comment can be assigned to a feedback thus the EdgeUpdateFeedbackRequest object features a method setComment which takes as argument either a string or a FeedbackComment enum which compiles some predefined comments. |
|
approvalState |
ApprovalStatus | no | The approval status of the feedback (APPROVED , REJECTED , PENDING ) |
The method returns an EdgeFeedbackResult object which is described here.
For more information about the API, access: Feedback operations.
Update Feedback Approval Status
The updateFeedbackApproval
method from EdgeLanguageWeaverClient can be used to update the approval status of an
existing translation feedback using a required EdgeUpdateFeedbackApprovalRequest
object.
EdgeUpdateFeedbackApprovalRequest edgeUpdateApprovalRequest = new EdgeUpdateFeedbackApprovalRequest()
.setFeedbackId("feedbackId")
.setApprovalStatus(ApprovalStatus.APPROVED);
EdgeFeedbackResult feedback = lwClient.updateFeedbackApproval(edgeUpdateApprovalRequest);
You can also obtain EdgeUpdateFeedbackApprovalRequest
from EdgeFeedbackResult
using the toUpdateApprovalRequest(ApprovalStatus)
method which will
contain the feedback's id and the requested approval status.
EdgeUpdateFeedbackApprovalRequest edgeUpdateApprovalRequest = feedback.toUpdateApprovalRequest(ApprovalStatus.APPROVED);
See the complete feedback samples on GitHub .
The EdgeUpdateFeedbackApprovalRequest object contains the following information:
Name | Type | Mandatory | Default value | Description |
---|---|---|---|---|
feedbackId |
string | yes | The id of the feedback to be updated | |
approvalStatus |
ApprovalStatus | yes | The approval status of the feedback (APPROVED , REJECTED , PENDING ) |
The method returns an EdgeFeedbackResult object which is described here.
For more information about the API, access: Feedback operations.
Delete Feedback
The deleteFeedback
method from EdgeLanguageWeaverClient can be used to delete an existing translation feedback using a
required EdgeDeleteFeedbackRequest
object.
EdgeDeleteFeedbackRequest deleteFeedbackRequest = new EdgeDeleteFeedbackRequest()
.setFeedbackId("feedbackId");
lwClient.deleteFeedback(deleteFeedbackRequest);
You can also obtain EdgeDeleteFeedbackRequest
from EdgeFeedbackResult
using the toDeleteRequest
method which will contain the feedback's id.
EdgeDeleteFeedbackRequest deleteFeedbackRequest = feedback.toDeleteRequest();
See the complete feedback samples on GitHub .
The EdgeDeleteFeedbackRequest object contains the following information:
Name | Type | Mandatory | Default value | Description |
---|---|---|---|---|
feedbackId |
string | yes | The id of the feedback to be deleted |
The method returns an EdgeFeedbackResult object which is described here.
For more information about the API, access: Feedback operations.
Get All Feedback
By using the getEdgeFeedback
method from EdgeLanguageWeaverClient, the list of available feedback will be returned,
corresponding to the given client identifier.
The feedback can be filtered by various criteria using an EdgeFilterFeedbackRequest
.
This is a paginated request thus the pageNumber
parameter is mandatory while the pageSize
will default to 100 if not specified.
EdgeFilterFeedbackRequest filterFeedbackRequest = new EdgeFilterFeedbackRequest()
.setLanguagePairId("languagePairId")
.setSourceText("sourceText")
.setMachineTranslation("machineTranslation")
.setSuggestedTranslation("suggestedTranslation")
.setComment("comment")
.setReviewer("reviewer username")
.setUser("creation username")
.addApprovalStatus(ApprovalStatus.APPROVED)
.addApprovalStatus(ApprovalStatus.PENDING)
.setStartDate("10/10/2021")
.setEndDate("10/10/2022");
EdgeFeedbackListResult feedbackList = lwClient.getEdgeFeedback(filterFeedbackRequest, 1, 50);
See the complete feedback samples on GitHub .
The getEdgeFeedback method has the following parameters:
Name | Type | Mandatory | Default | Description |
---|---|---|---|---|
pageNumber |
integer | yes | Number specifying the requested page number | |
pageSize |
integer | no | 100 | Number specifying the requested page size |
filterRequest |
EdgeFilterFeedbackRequest | no | Object specifying the criteria by which the returned feedback to be filtered |
The EdgeFilterFeedbackRequest object contains the following information:
Name | Type | Mandatory | Default | Description |
---|---|---|---|---|
startDate |
string | yes | A string representing the start date for the filtered feedback in the format dd/mm/yyyy |
|
endDate |
string | yes | A string representing the end date for the filtered feedback in the format dd/mm/yyyy |
|
user |
string | no | The username of the user who created the feedback | |
languagePairId |
string | no | Language pair identifier. Cannot be used in combination with sourceLanguageId or targetLanguageId | |
sourceLanguageId |
string | no | Three letters language code of the source language | |
targetLanguageId |
string | no | Three letters language code of the target language | |
sourceText |
string | no | Text provided to be translated | |
machineTranslation |
string | no | Translation provided by machine translation | |
suggestedTranslation |
string | no | Expected translation | |
comment |
string | no | Comment about translation | |
approvalStatuses |
array | no | Array of approval statuses (APPROVED , REJECTED , POOR ) which can be added to the request using the method addApprovalStatus |
|
reviewer |
string | no | The email of the user who reviewed the feedback |
The EdgeFeedbackListResult object contains the following information:
Name | Type | Description |
---|---|---|
feedbackList |
array | Array of EdgeFeedbackResult objects |
pageNumber |
integer | Number specifying the requested page number |
pageSize |
integer | Number specifying the requested page size |
totalCount |
long | Total number of filtered feedbacks for the given account |
totalPages |
integer | Total number of pages available |
For more information about the API, access: Feedback operations.
Input Formats
Language Weaver Edge supports the following input formats:
XML Formats
MIME Type | File Extensions | Description |
---|---|---|
text/html | .htm, .html, .xhtml | HTML |
text/xml | .xml | XML |
text/x-sdl-strict-xml | .sdlxml | XML with strict segmentation after each XML tag |
text/x-tmx | .tmx | Translation Memory eXchange (TMX) |
application/x-xliff | .xliff | XML Localization Interchange File Format v1.x (XLIFF) |
application/xliff | .xliff | XML Localization Interchange File Format v2.x (XLIFF) |
Text Formats
MIME Type | File Extensions | Description |
---|---|---|
text/plain | .txt | Plain text |
text/x-line | .xline | Plain text, one sentence per line |
Image Formats
MIME Type | File Extensions | Description |
---|---|---|
image/gif | .gif | Graphics Interchange Format (GIF) |
image/jpeg | .jpg, .jpeg | JPEG |
image/png | .png | Portable Network Graphics (PNG) |
image/tiff | .tiff, .tif | Tagged Image File Format (TIFF) |
Email Formats
MIME Type | File Extensions | Description |
---|---|---|
application/vnd.ms-outlook | .msg | Microsoft Outlook Email Message |
message/rfc822 | .eml | Message (RFC 822) |
Rich Formats
MIME Type | File Extensions | Description |
---|---|---|
application/pdf | Adobe Acrobat (PDF) | |
application/rtf | .rtf | Rich Text Format (RTF) |
application/vnd.openxmlformats-officedocument.wordprocessingml.document | .docx, .dotx, .docm, .dotm | Microsoft Word (Office Open XML) |
application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | .xlsx, .xltx, .xlsm, .xltm, .xlam | Microsoft Excel (Office Open XML) |
application/vnd.openxmlformats-officedocument.presentationml.presentation | .pptx, .potx, .ppsx, .ppam, .pptm, .potm, .ppsm | Microsoft PowerPoint (Office Open XML) |
application/msword | .doc, .dot | Microsoft Word (97-2003) |
application/vnd.ms-excel | .xls, .xlt, .xla, .xlsb | Microsoft Excel (97-2003) |
application/vnd.ms-powerpoint | .ppt, .pot, .pps, .ppa | Microsoft PowerPoint (97-2003) |
application/vnd.oasis.opendocument.text | .odt | OpenDocument Text |
application/vnd.oasis.opendocument.spreadsheet | .ods | OpenDocument Spreadsheet |
application/vnd.oasis.opendocument.presentation | .odp | OpenDocument Presentation |
application/x-wps-writer | .wps | WPS Writer |
application/x-wps-spreadsheet | .et | WPS Spreadsheet |
application/x-wps-presentation | .dps | WPS Presentation |
Output Formats
MIME Type | Description |
---|---|
default or empty | Default output: - For image, audio and email input formats, output format is text/plain - For application/pdf input, output format is text/plain if it is an image-only PDF, otherwise output format is application/vnd.openxmlformats-officedocument.wordprocessingml.document - For all other input formats, output format is the same as the input format. |
text/plain | Plain text |
application/x-xliff | XML Localization Interchange File Format (v1.2) |
application/xliff | XML Localization Interchange File Format (v2.1) |
text/x-tmx | Translation Memory eXchange |
Encodings
Language Weaver Edge supports the following character encodings for source documents:
Encoding |
---|
Big5 |
EUC-JP |
EUC-KR |
GB18030 |
IBM420_ltr |
IBM420_rtl |
IBM424_ltr |
IBM424_rtl |
ISO-2022-CN |
ISO-2022-JP |
ISO-2022-KR |
ISO-8859-1 |
ISO-8859-2 |
ISO-8859-5 |
ISO-8859-6 |
ISO-8859-7 |
ISO-8859-8 |
ISO-8859-8-I |
ISO-8859-9 |
KOI8-R |
Shift_JIS |
UTF-16BE |
UTF-16LE |
UTF-32BE |
UTF-32LE |
UTF-8 |
windows-1251 |
windows-1255 |
windows-1256 |
In addition to the encodings above, ‘Auto’ may be specified to allow automatic detection.