Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Request to support Brevity, Formality and Profanity with Amazon Translate in Prediction #14221

Open
2 tasks
ashwinkumar6 opened this issue Feb 17, 2025 · 0 comments
Labels
feature-request Request a new feature Predictions Related to Predictions category

Comments

@ashwinkumar6
Copy link
Member

ashwinkumar6 commented Feb 17, 2025

Is this related to a new or existing framework?

isn't framework specific

Is this related to a new or existing API?

Predictions, convert API

Is this related to another service?

Amazon Translate

Describe the feature you'd like to request

I would like to request support for Amazon Translate’s Brevity, Formality, and Profanity options in the Predictions category of Amplify JS. These options allow users to customize translations according to their needs:

  • Brevity: Controls the length of translated output.
  • Formality: Adjusts the formality level of the translated text.
  • Profanity: Enables users to mask or remove profane words in translations.

Currently, Amplify Predictions does not expose these settings, which limits the flexibility of Amazon Translate integration. Adding support for these options would allow developers to fine-tune translations for different use cases, such as professional applications, casual conversations, or content moderation.

Describe the solution you'd like

I propose extending the translateText API in Amplify JS to include optional parameters for brevity, formality, and profanity handling, similar to how Amazon Translate provides them. This could be implemented as additional configuration fields when calling the Predictions API, for

Predictions.convert({
  translateText: {
    source: {
      text: "Hello, how are you?",
      language: "en",
    },
    targetLanguage: "fr",
    options: {
      formality: "formal",  // "formal" or "informal"
      brevity: "concise",    // "concise" or "verbose"
      profanity: "mask",     // "mask", "remove", or "none"
    }
  }
})
.then(result => console.log(result.text))
.catch(err => console.error(err));

Describe alternatives you've considered

N/A

Additional context

No response

Is this something that you'd be interested in working on?

  • 👋 I may be able to implement this feature request
  • ⚠️ This feature might incur a breaking change
@github-actions github-actions bot added the pending-triage Issue is pending triage label Feb 17, 2025
@ashwinkumar6 ashwinkumar6 added feature-request Request a new feature Predictions Related to Predictions category and removed pending-triage Issue is pending triage labels Feb 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request a new feature Predictions Related to Predictions category
Projects
None yet
Development

No branches or pull requests

1 participant