{"id":17333196,"url":"https://github.com/brenoepics/at4j","last_synced_at":"2025-04-14T16:33:39.708Z","repository":{"id":216686004,"uuid":"742019598","full_name":"brenoepics/at4j","owner":"brenoepics","description":"Microsoft Azure Translator for Java","archived":false,"fork":false,"pushed_at":"2024-08-20T00:44:49.000Z","size":1277,"stargazers_count":19,"open_issues_count":2,"forks_count":3,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-08-20T04:30:50.726Z","etag":null,"topics":["auto-translation","azure","azure-translation","collaborate","ghdesktop","github","github-copilot","github-pages","jetbrains","microsoft","microsoft-azure","microsoft-translator","tech","translation","translation-api","translation-tool","translator"],"latest_commit_sha":null,"homepage":"https://brenoepics.github.io/at4j/","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/brenoepics.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-01-11T15:41:49.000Z","updated_at":"2024-08-20T04:30:55.649Z","dependencies_parsed_at":"2024-01-12T01:49:03.837Z","dependency_job_id":"a149a316-7899-41dc-a161-361bade47733","html_url":"https://github.com/brenoepics/at4j","commit_stats":null,"previous_names":["brenoepics/at4j"],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brenoepics%2Fat4j","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brenoepics%2Fat4j/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brenoepics%2Fat4j/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/brenoepics%2Fat4j/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/brenoepics","download_url":"https://codeload.github.com/brenoepics/at4j/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":219843527,"owners_count":16556504,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auto-translation","azure","azure-translation","collaborate","ghdesktop","github","github-copilot","github-pages","jetbrains","microsoft","microsoft-azure","microsoft-translator","tech","translation","translation-api","translation-tool","translator"],"created_at":"2024-10-15T15:00:10.990Z","updated_at":"2024-10-15T15:00:11.640Z","avatar_url":"https://github.com/brenoepics.png","language":"Java","readme":"# Azure Translator for Java (AT4J)\n\n[![Maven Central](https://img.shields.io/maven-central/v/io.github.brenoepics/at4j?color=blue)](https://central.sonatype.com/artifact/io.github.brenoepics/at4j)\n![Static Badge](https://img.shields.io/badge/azure--api-3.0-blue?style=flat\u0026logo=microsoftazure\u0026logoColor=%230080FF\u0026color=%230080FF\u0026link=https%3A%2F%2Flearn.microsoft.com%2Fen-us%2Fazure%2Fai-services%2Ftranslator%2Freference%2Fv3-0-reference)\n[![Static Badge](https://img.shields.io/badge/run-l?logo=postman\u0026label=Postman\u0026color=EF5B25)](https://www.postman.com/maintenance-astronaut-2993290/workspace/brenoepics/collection/18589822-dfe7a640-9b94-47a8-b19f-46cb9cc8843e?action=share\u0026creator=18589822)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=brenoepics_at4j\u0026metric=coverage)](https://sonarcloud.io/summary/new_code?id=brenoepics_at4j)\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=brenoepics_at4j\u0026metric=alert_status)](https://sonarcloud.io/summary/new_code?id=brenoepics_at4j)\n\nAn unofficial Java library for translating text using Azure AI Cognitive Services.\n\n## ✨ Features\n\n- Text Translation: Translate text from one language (or detect) to another or to a list of languages.\n- Language Detection: Detect the language of a given text.\n- Profanity Handling: Options for handling profanity in translations.\n- Text Type Support: We support both plain text and HTML text translation.\n- And more.\n\n## 📝 Documentation\n\n- [AT4J Docs](https://brenoepics.github.io/at4j/)\n- [JavaDoc](https://brenoepics.github.io/at4j/javadoc/)\n\n## 🎉 Basic Usage\n\n\u003e [!NOTE]\n\u003e Example repository [Azure-Translator-Example](https://github.com/brenoepics/Azure-Translator-Example)\n\nThe following example translates a simple Hello World to Portuguese, Spanish and French.\n\n```java\npublic class ExampleTranslator {\n  public static void main(String[] args) {\n    // Insert your Azure key and region here\n    String azureKey = \"\u003cYour Azure Subscription Key\u003e\";\n    String azureRegion = \"\u003cYour Azure Subscription Region\u003e\";\n    AzureApi api = new AzureApiBuilder().setKey(azureKey).region(azureRegion).build();\n\n    // Set up translation parameters\n    List \u003c String \u003e targetLanguages = List.of(\"pt\", \"es\", \"fr\");\n    TranslateParams params =\n            new TranslateParams(\"Hello World!\", targetLanguages).setSourceLanguage(\"en\");\n\n    // Translate the text\n    Optional \u003c TranslationResponse \u003e translationResult = api.translate(params).join();\n\n    // Print the translations\n    translationResult.ifPresent(\n            response -\u003e\n                    response.getFirstResult().getTranslations().forEach(ExampleTranslator::logLanguage));\n  }\n\n  public static void logLanguage(Translation translation) {\n    System.out.println(translation.getLanguageCode() + \": \" + translation.getText());\n  }\n}\n```\n\n\u003cdetails\u003e\n     \u003csummary\u003eExpected Output\u003c/summary\u003e\n\n```console\npt: Olá, Mundo!\nes: ¡Hola mundo!\nfr: Salut tout le monde!\n```\n\n\u003c/details\u003e\n\n## 📦 Download / Installation\n\nThe recommended way to get AT4J is to use a build manager, like Gradle or Maven.\n\n### [AT4J Dependency](https://central.sonatype.com/artifact/io.github.brenoepics/at4j)\n\n\u003cdetails\u003e\n  \u003csummary\u003eGradle\u003c/summary\u003e\n\n```gradle\nimplementation group: 'io.github.brenoepics', name: 'at4j', version: '1.2.0'\n```\n\n\u003c/details\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eMaven\u003c/summary\u003e\n\n```xml\n\n\u003cdependency\u003e\n    \u003cgroupId\u003eio.github.brenoepics\u003c/groupId\u003e\n    \u003cartifactId\u003eat4j\u003c/artifactId\u003e\n    \u003cversion\u003e1.2.0\u003c/version\u003e\n\u003c/dependency\u003e\n```\n\n\u003c/details\u003e\n\u003cdetails\u003e\n  \u003csummary\u003eSbt\u003c/summary\u003e\n\n```sbt\nlibraryDependencies += \"io.github.brenoepics\" % \"at4j\" % \"1.2.0\"\n```\n\n\u003c/details\u003e\n\n### Frequently Asked Questions (FAQ)\n\n**Q:** How do I access Azure Translator Keys for my project?\n\n**A:** You can access your Azure Translator Keys through your Azure portal. Remember to keep your keys secure and\nrefrain from sharing them publicly. If you suspect a key has been compromised, it's crucial to regenerate it promptly.\nFor detailed instructions on generating your own keys, refer\nto [this guide](https://brenoepics.github.io/at4j/guide/azure-subscription.html#azure-subscription). Additionally, you\ncan explore the [Azure Free Tier](https://brenoepics.github.io/at4j/guide/azure-subscription.html#azure-free-tier) for\nmore information.\n\n## 🤝 Thank You!\n\n- **Microsoft Azure**: Supporting our project with a generous grant of $10,000+ in Azure credits, enabling us to use\n  virtual machines, document translation and other essential cloud resources for our development needs.\n- We extend our sincere thanks to all contributors for their invaluable contributions.\n\n## 🧑‍💻 Contributing\n\nContributions of any kind are welcome. You can start contributing to this library by creating issues, submitting pull\nrequests or giving a star to the project.\n\n## 📃 License\n\nAT4J is distributed under the [Apache license version 2.0](./LICENSE).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrenoepics%2Fat4j","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbrenoepics%2Fat4j","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbrenoepics%2Fat4j/lists"}