检测文本输入 java_快速入门:检测文本语言,Java - 文本翻译 API - Azure Cognitive Services | Azure Docs...

快速入门:使用文本翻译 API 通过 Java 来检测文本语言Quickstart: Use the Translator Text API to detect text language using Java

07/23/2019

本文内容

本快速入门介绍如何使用 Java 和文本翻译 REST API 来检测所提供文本的语言。In this quickstart, you'll learn how to detect the language of provided text using Java and the Translator Text REST API.

此快速入门需要包含文本翻译资源的 Azure 认知服务帐户。This quickstart requires an Azure Cognitive Services account with a Translator Text resource. 如果没有帐户,可以使用试用帐户获取订阅密钥。If you don't have an account, you can use the trial to get a subscription key.

提示

如果你想一次看到所有代码,这个示例的源代码可以在 GitHub 上找到。If you'd like to see all the code at once, the source code for this sample is available on GitHub.

先决条件Prerequisites

适用于文本翻译的 Azure 订阅密钥An Azure subscription key for Translator Text

使用 Gradle 初始化项目Initialize a project with Gradle

首先,创建此项目的工作目录。Let's start by creating a working directory for this project. 从命令行(或终端)中,运行以下命令:From the command line (or terminal), run this command:

mkdir detect-sample

cd detect-sample

接下来,初始化一个 Gradle 项目。Next, you're going to initialize a Gradle project. 此命令将创建 Gradle 的基本生成文件,最重要的是 build.gradle.kts,它在运行时用来创建并配置应用程序。This command will create essential build files for Gradle, most importantly, the build.gradle.kts, which is used at runtime to create and configure your application.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值