

기계 번역으로 제공되는 번역입니다. 제공된 번역과 원본 영어의 내용이 상충하는 경우에는 영어 버전이 우선합니다.

# API를 사용한 실시간 분석
<a name="using-api-sync"></a>

다음 예제에서는 AWS CLI및 AWS .NET, Java 및 Python용 SDKs를 사용하여 실시간 분석에 Amazon Comprehend API를 사용하는 방법을 보여줍니다. 이러한 예제를 통해 Amazon Comprehend 작업에 대해 알아보고 자체 애플리케이션의 구성 요소로 사용할 수 있습니다.

이 단원의 .NET 예제는 [AWS SDK for .NET](https://docs.aws.amazon.com/sdk-for-net/latest/developer-guide/welcome.html)을 사용합니다. 를 사용하여 .NET[AWS Toolkit for Visual Studio](https://docs.aws.amazon.com/AWSToolkitVS/latest/UserGuide/welcome.html)을 사용하는 AWS 애플리케이션을 개발할 수 있습니다. 여기에는 애플리케이션 배포 및 서비스 관리를 위한 유용한 템플릿과 AWS Explorer가 포함되어 있습니다. .NET 개발자의 관점은 .NET 개발자 안내서를 AWS참조하세요. [AWS](https://docs.aws.amazon.com/sdk-for-net/latest/developer-guide/welcome.html) 

**Topics**
+ [지배적 언어 감지](#get-started-api-dominant-language)
+ [명명된 개체 감지](#get-started-api-entities)
+ [핵심 문구 감지](#get-started-api-key-phrases)
+ [감성 확인](#get-started-api-sentiment)
+ [대상 감성에 대한 실시간 분석](#get-started-api-targeted-sentiment)
+ [구문 감지](#get-started-api-syntax)
+ [실시간 배치 API](#get-started-batch)

## 지배적 언어 감지
<a name="get-started-api-dominant-language"></a>

텍스트에 사용되는 지배적 언어를 확인하려면 [DetectDominantLanguage](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_DetectDominantLanguage.html) 작업을 사용합니다. 최대 25개 문서에서 지배적 언어를 일괄 감지하려면 [BatchDetectDominantLanguage](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_BatchDetectDominantLanguage.html) 작업을 사용합니다. 자세한 내용은 [실시간 배치 API](#get-started-batch) 단원을 참조하십시오.

**Topics**
+ [사용 AWS Command Line Interface](#get-started-api-dominant-language-cli)
+ [AWS SDK for Java, SDK for Python 또는 사용 SDK for .NET](#get-started-api-dominant-language-java)

### 사용 AWS Command Line Interface
<a name="get-started-api-dominant-language-cli"></a>

다음 예제는 AWS CLI로 `DetectDominantLanguage` 작업을 사용하는 방법을 보여 줍니다.

다음은 Unix, Linux, macOS용 형식으로 지정된 예제입니다. Windows의 경우 각 줄의 끝에 있는 백슬래시(\$1) Unix 연속 문자를 캐럿(^)으로 바꿉니다.

```
aws comprehend detect-dominant-language \
    --region region \
    --text "It is raining today in Seattle."
```

Amazon Comprehend가 다음과 같이 응답합니다.

```
{
    "Languages": [
        {
            "LanguageCode": "en",
            "Score": 0.9793661236763
        }
    ]
}
```

### AWS SDK for Java, SDK for Python 또는 사용 SDK for .NET
<a name="get-started-api-dominant-language-java"></a>

지배적 언어를 결정하는 방법에 대한 SDK 예제는 [AWS SDK 또는 CLI와 `DetectDominantLanguage` 함께 사용](example_comprehend_DetectDominantLanguage_section.md)를 참조하세요.

## 명명된 개체 감지
<a name="get-started-api-entities"></a>

문서에서 명명된 개체를 확인하려면 [DetectEntities](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_DetectEntities.html) 작업을 사용합니다. 최대 25개 문서에서 개체를 일괄 감지하려면 [BatchDetectEntities](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_BatchDetectEntities.html) 작업을 사용합니다. 자세한 내용은 [실시간 배치 API](#get-started-batch) 단원을 참조하십시오.

**Topics**
+ [사용 AWS Command Line Interface](#get-started-api-entities-cli)
+ [AWS SDK for Java, SDK for Python 또는 사용 SDK for .NET](#get-started-api-entities-java)

### 사용 AWS Command Line Interface
<a name="get-started-api-entities-cli"></a>

다음 예제는 AWS CLI로 `DetectEntities` 작업을 사용하는 방법을 보여 줍니다. 입력 텍스트의 언어를 지정해야 합니다.

다음은 Unix, Linux, macOS용 형식으로 지정된 예제입니다. Windows의 경우 각 줄의 끝에 있는 백슬래시(\$1) Unix 연속 문자를 캐럿(^)으로 바꿉니다.

```
aws comprehend detect-entities \
    --region region \
    --language-code "en" \
    --text "It is raining today in Seattle."
```

Amazon Comprehend가 다음과 같이 응답합니다.

```
{
    "Entities": [
        {
            "Text": "today",
            "Score": 0.97,
            "Type": "DATE",
            "BeginOffset": 14,
            "EndOffset": 19
        },
        {
            "Text": "Seattle",
            "Score": 0.95,
            "Type": "LOCATION",
            "BeginOffset": 23,
            "EndOffset": 30
        }
    ],
    "LanguageCode": "en"
}
```

### AWS SDK for Java, SDK for Python 또는 사용 SDK for .NET
<a name="get-started-api-entities-java"></a>

지배적 언어를 결정하는 방법에 대한 SDK 예제는 [AWS SDK 또는 CLI와 `DetectEntities` 함께 사용](example_comprehend_DetectEntities_section.md)를 참조하세요.

## 핵심 문구 감지
<a name="get-started-api-key-phrases"></a>

텍스트에 사용되는 핵심 명사구를 확인하려면 [DetectKeyPhrases](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_DetectKeyPhrases.html) 작업을 사용합니다. 최대 25개 문서에서 핵심 명사구를 일괄 감지하려면 [BatchDetectKeyPhrases](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_BatchDetectKeyPhrases.html) 작업을 사용합니다. 자세한 내용은 [실시간 배치 API](#get-started-batch) 단원을 참조하십시오.

**Topics**
+ [사용 AWS Command Line Interface](#get-started-api-key-phrases-cli)
+ [AWS SDK for Java, SDK for Python 또는 사용 SDK for .NET](#get-started-api-key-phrases-java)

### 사용 AWS Command Line Interface
<a name="get-started-api-key-phrases-cli"></a>

다음 예제는 AWS CLI로 `DetectKeyPhrases` 작업을 사용하는 방법을 보여 줍니다. 입력 텍스트의 언어를 지정해야 합니다.

다음은 Unix, Linux, macOS용 형식으로 지정된 예제입니다. Windows의 경우 각 줄의 끝에 있는 백슬래시(\$1) Unix 연속 문자를 캐럿(^)으로 바꿉니다.

```
aws comprehend detect-key-phrases \
    --region region \
    --language-code "en" \
    --text "It is raining today in Seattle."
```

Amazon Comprehend가 다음과 같이 응답합니다.

```
{
    "LanguageCode": "en",
    "KeyPhrases": [
        {
            "Text": "today",
            "Score": 0.89,
            "BeginOffset": 14,
            "EndOffset": 19
        },
        {
            "Text": "Seattle",
            "Score": 0.91,
            "BeginOffset": 23,
            "EndOffset": 30
        }
    ]
}
```

### AWS SDK for Java, SDK for Python 또는 사용 SDK for .NET
<a name="get-started-api-key-phrases-java"></a>

핵심 문구를 감지하는 SDK 예제는 [AWS SDK 또는 CLI와 `DetectKeyPhrases` 함께 사용](example_comprehend_DetectKeyPhrases_section.md)를 참조하세요.

## 감성 확인
<a name="get-started-api-sentiment"></a>

Amazon Comprehend는 감성 분석을 위한 다음과 같은 API 작업을 제공합니다.
+ [DetectSentiment](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_DetectSentiment.html) — 문서의 전반적인 감정적 감성을 결정합니다.
+  [BatchDetectSentition](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_BatchDetectSentiment.html) — 최대 25개 문서의 전반적인 감성을 일괄 확인합니다. 자세한 정보는 [실시간 배치 API](#get-started-batch)를 참조하세요.
+  [StartSentimentDetectionJob](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_StartSentimentDetectionJob.html) – 문서 모음에 대해 비동기식 감성 감지 작업을 시작합니다.
+  [ListSentimentDetectionJobs](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_ListSentimentDetectionJobs.html) – 제출한 감성 감지 작업의 목록을 반환합니다.
+  [DescribeSentimentDetectionJob](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_DescribeSentimentDetectionJob.html) – 지정된 감성 감지 작업과 관련된 속성(상태 포함)을 가져옵니다.
+  [StopSentimentDetectionJob](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_StopSentimentDetectionJob.html) – 진행 중인 지정된 감성 작업을 중지합니다.

**Topics**
+ [사용 AWS Command Line Interface](#get-started-api-sentiment-cli)
+ [AWS SDK for Java, SDK for Python 또는 사용 SDK for .NET](#get-started-api-sentiment-java)

### 사용 AWS Command Line Interface
<a name="get-started-api-sentiment-cli"></a>

다음 예제는 AWS CLI로 `DetectSentiment` 작업을 사용하는 방법을 보여 줍니다. 이 예제는 입력 텍스트의 언어를 지정합니다.

다음은 Unix, Linux, macOS용 형식으로 지정된 예제입니다. Windows의 경우 각 줄의 끝에 있는 백슬래시(\$1) Unix 연속 문자를 캐럿(^)으로 바꿉니다.

```
aws comprehend detect-sentiment \
    --region region \
    --language-code "en" \
    --text "It is raining today in Seattle."
```

 Amazon Comprehend가 다음과 같이 응답합니다.

```
{
    "SentimentScore": {
        "Mixed": 0.014585512690246105,
        "Positive": 0.31592071056365967,
        "Neutral": 0.5985543131828308,
        "Negative": 0.07093945890665054
    },
    "Sentiment": "NEUTRAL",
    "LanguageCode": "en"
}
```

### AWS SDK for Java, SDK for Python 또는 사용 SDK for .NET
<a name="get-started-api-sentiment-java"></a>

입력 텍스트의 감성을 결정하는 SDK 예제는 [AWS SDK 또는 CLI와 `DetectSentiment` 함께 사용](example_comprehend_DetectSentiment_section.md)를 참조하세요.

## 대상 감성에 대한 실시간 분석
<a name="get-started-api-targeted-sentiment"></a>

Amazon Comprehend는 대상 감성 실시간 분석을 위한 다음과 같은 API 작업을 제공합니다.
+ [DetectTargetedSentiment](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_DetectTargetedSentiment.html) — 문서에 언급된 개체의 감성을 분석합니다.
+  [BatchDetectTargetedSentiment](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_BatchDetectTargetedSentiment.html) — 최대 25개 문서에 대한 대상 감성을 일괄 분석합니다. 자세한 정보는 [실시간 배치 API](#get-started-batch)를 참조하십시오.

분석 중인 텍스트에 대상 감성 [개체 유형](how-targeted-sentiment.md#how-targeted-sentiment-entities)이 없는 경우 API는 빈 개체 배열을 반환합니다.

### 사용 AWS Command Line Interface
<a name="get-started-api-targeted-sentiment-cli"></a>

다음 예제는 AWS CLI로 `DetectTargetedSentiment` 작업을 사용하는 방법을 보여 줍니다. 이 예제는 입력 텍스트의 언어를 지정합니다.

다음은 Unix, Linux, macOS용 형식으로 지정된 예제입니다. Windows의 경우 각 줄의 끝에 있는 백슬래시(\$1) Unix 연속 문자를 캐럿(^)으로 바꿉니다.

```
aws comprehend detect-targeted-sentiment \
    --region region \
    --language-code "en" \
    --text "The burger was cooked perfectly but it was cold. The service was OK."
```

 Amazon Comprehend가 다음과 같이 응답합니다.

```
{
"Entities": [
    {
      "DescriptiveMentionIndex": [
        0
      ],
      "Mentions": [
        {
          "BeginOffset": 4,
          "EndOffset": 10,
          "Score": 1,
          "GroupScore": 1,
          "Text": "burger",
          "Type": "OTHER",
          "MentionSentiment": {
            "Sentiment": "POSITIVE",
            "SentimentScore": {
              "Mixed": 0.001515,
              "Negative": 0.000822,
              "Neutral": 0.000243,
              "Positive": 0.99742
            }
          }
        },
        {
          "BeginOffset": 36,
          "EndOffset": 38,
          "Score": 0.999843,
          "GroupScore": 0.999661,
          "Text": "it",
          "Type": "OTHER",
          "MentionSentiment": {
            "Sentiment": "NEGATIVE",
            "SentimentScore": {
              "Mixed": 0,
              "Negative": 0.999996,
              "Neutral": 0.000004,
              "Positive": 0
            }
          }
        }
      ]
    },
    {
      "DescriptiveMentionIndex": [
        0
      ],
      "Mentions": [
        {
          "BeginOffset": 53,
          "EndOffset": 60,
          "Score": 1,
          "GroupScore": 1,
          "Text": "service",
          "Type": "ATTRIBUTE",
          "MentionSentiment": {
            "Sentiment": "NEUTRAL",
            "SentimentScore": {
              "Mixed": 0.000033,
              "Negative": 0.000089,
              "Neutral": 0.993325,
              "Positive": 0.006553
            }
          }
        }
      ]
    }
  ]
}
```

## 구문 감지
<a name="get-started-api-syntax"></a>

텍스트 구문 분석을 통해 개별 단어를 추출하고 각 단어의 품사를 결정하려면 [DetectSyntax](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_DetectSyntax.html) 작업을 사용합니다. 최대 25개 문서에서 구문 분석을 일괄 수행하려면 [BatchDetectSyntax](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_BatchDetectSyntax.html) 작업을 사용합니다. 자세한 내용은 [실시간 배치 API](#get-started-batch) 단원을 참조하십시오.

**Topics**
+ [사용 AWS Command Line Interface.](#get-started-api-syntax-cli)
+ [AWS SDK for Java, SDK for Python 또는 사용 SDK for .NET](#get-started-api-syntax-java)

### 사용 AWS Command Line Interface.
<a name="get-started-api-syntax-cli"></a>

다음 예제는 AWS CLI로 `DetectSyntax` 작업을 사용하는 방법을 보여 줍니다. 이 예제는 입력 텍스트의 언어를 지정합니다.

다음은 Unix, Linux, macOS용 형식으로 지정된 예제입니다. Windows의 경우 각 줄의 끝에 있는 백슬래시(\$1) Unix 연속 문자를 캐럿(^)으로 바꿉니다.

```
aws comprehend detect-syntax \
   --region region \
   --language-code "en" \
   --text "It is raining today in Seattle."
```

Amazon Comprehend가 다음과 같이 응답합니다.

```
{
    "SyntaxTokens": [
        {
            "Text": "It",
            "EndOffset": 2,
            "BeginOffset": 0,
            "PartOfSpeech": {
                "Tag": "PRON",
                "Score": 0.8389829397201538
            },
            "TokenId": 1
        },
        {
            "Text": "is",
            "EndOffset": 5,
            "BeginOffset": 3,
            "PartOfSpeech": {
                "Tag": "AUX",
                "Score": 0.9189288020133972
            },
            "TokenId": 2
        },
        {
            "Text": "raining",
            "EndOffset": 13,
            "BeginOffset": 6,
            "PartOfSpeech": {
                "Tag": "VERB",
                "Score": 0.9977611303329468
            },
            "TokenId": 3
        },
        {
            "Text": "today",
            "EndOffset": 19,
            "BeginOffset": 14,
            "PartOfSpeech": {
                "Tag": "NOUN",
                "Score": 0.9993606209754944
            },
            "TokenId": 4
        },
        {
            "Text": "in",
            "EndOffset": 22,
            "BeginOffset": 20,
            "PartOfSpeech": {
                "Tag": "ADP",
                "Score": 0.9999061822891235
            },
            "TokenId": 5
        },
        {
            "Text": "Seattle",
            "EndOffset": 30,
            "BeginOffset": 23,
            "PartOfSpeech": {
                "Tag": "PROPN",
                "Score": 0.9940338730812073
            },
            "TokenId": 6
        },
        {
            "Text": ".",
            "EndOffset": 31,
            "BeginOffset": 30,
            "PartOfSpeech": {
                "Tag": "PUNCT",
                "Score": 0.9999997615814209
            },
            "TokenId": 7
        }
    ]
}
```

### AWS SDK for Java, SDK for Python 또는 사용 SDK for .NET
<a name="get-started-api-syntax-java"></a>

입력 텍스트의 구문을 감지하는 SDK 예제는 [AWS SDK 또는 CLI와 `DetectSyntax` 함께 사용](example_comprehend_DetectSyntax_section.md)를 참조하세요.

## 실시간 배치 API
<a name="get-started-batch"></a>

최대 25개 문서의 배치를 전송하려면 Amazon Comprehend 실시간 배치 작업을 사용할 수 있습니다. 배치 호출 작업은 요청의 각 문서에 대해 단일 문서 API를 호출하는 것과 동일합니다. 배치 API를 사용하면 애플리케이션 성능이 향상될 수 있습니다. 자세한 내용은 [다중 문서 동기 처리](concepts-processing-modes.md#how-batch) 단원을 참조하십시오.

**Topics**
+ [를 사용한 배치 처리 AWS CLI](#batch-cli)
+ [를 사용한 배치 처리 AWS SDK for .NET](#batch-csharp)

### 를 사용한 배치 처리 AWS CLI
<a name="batch-cli"></a>

이 예제에서는 AWS Command Line Interface로 배치 API 작업을 사용하는 방법을 보여줍니다. `BatchDetectDominantLanguage`를 제외한 모든 작업은 입력으로 `process.json`이라는 다음과 같은 JSON 파일을 사용합니다. 해당 작업에는 `LanguageCode` 개체가 포함되지 않습니다.

JSON 파일(`"$$$$$$$$"`)의 세 번째 문서가 배치 처리 중에 오류를 일으킬 것입니다. 작업이 [BatchItemError](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_BatchItemError.html)를 응답에 포함하도록 이 문서를 포함시킨 것입니다.

```
{
   "LanguageCode": "en",
   "TextList": [
      "I have been living in Seattle for almost 4 years",
      "It is raining today in Seattle",
      "$$$$$$$$"
   ]
}
```

Unix, Linux, macOS용 형식으로 지정된 예제입니다. Windows의 경우 각 줄의 끝에 있는 백슬래시(\$1) Unix 연속 문자를 캐럿(^)으로 바꿉니다.

**Topics**
+ [배치(AWS CLI)를 사용한 지배적 언어 감지](#batch-dominant-language)
+ [배치(AWS CLI)를 사용한 개체 감지](#batch-entities)
+ [배치(AWS CLI)를 사용한 핵심 문구 감지](#batch-key-phrase)
+ [배치(AWS CLI)를 사용한 감성 감지](#batch-sentiment)

#### 배치(AWS CLI)를 사용한 지배적 언어 감지
<a name="batch-dominant-language"></a>

[BatchDetectDominantLanguage](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_BatchDetectDominantLanguage.html) 작업은 각 문서의 지배적 언어를 일괄 결정합니다. Amazon Comprehend에서 감지할 수 있는 언어 목록은 [지배적 언어](how-languages.md)을 참조하세요. 다음 AWS CLI 명령은 `BatchDetectDominantLanguage` 작업을 호출합니다.

```
aws comprehend batch-detect-dominant-language \
    --endpoint endpoint \
    --region region \
    --cli-input-json file://path to input file/process.json
```

다음은 `BatchDetectDominantLanguage` 작업의 응답입니다.

```
{
    "ResultList": [
        {
          "Index": 0,
          "Languages":[
            {
              "LanguageCode":"en",
              "Score": 0.99
            }
          ]
        },
        {
          "Index": 1
          "Languages":[
            {
              "LanguageCode":"en",
              "Score": 0.82
            }
          ]
        }
    ],
    "ErrorList": [
      {
        "Index": 2,
        "ErrorCode": "InternalServerException",
        "ErrorMessage": "Unexpected Server Error. Please try again."
      }
    ]
}
```

#### 배치(AWS CLI)를 사용한 개체 감지
<a name="batch-entities"></a>

[BatchDetectEntities](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_BatchDetectEntities.html) 작업을 사용하여 문서 배치에 있는 개체를 감지할 수 있습니다. 개체 태그 지정에 대한 자세한 내용은 [개체](how-entities.md)을 참조하세요. 다음 AWS CLI 명령은 `BatchDetectEntities` 작업을 호출합니다.

```
aws comprehend batch-detect-entities \
    --endpoint endpoint \
    --region region \
    --cli-input-json file://path to input file/process.json
```

#### 배치(AWS CLI)를 사용한 핵심 문구 감지
<a name="batch-key-phrase"></a>

[BatchDetectKeyPhrases](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_BatchDetectKeyPhrases.html) 작업은 문서 배치의 핵심 명사구를 반환합니다. 다음 AWS CLI 명령은 `BatchDetectKeyNounPhrases` 작업을 호출합니다.

```
aws comprehend batch-detect-key-phrases
    --endpoint endpoint
    --region region
    --cli-input-json file://path to input file/process.json
```

#### 배치(AWS CLI)를 사용한 감성 감지
<a name="batch-sentiment"></a>

[BatchDetectSentiment](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_BatchDetectSentiment.html) 작업을 사용하여 문서 배치의 전반적인 감성을 감지합니다. 다음 AWS CLI 명령은 `BatchDetectSentiment` 작업을 호출합니다.

```
aws comprehend batch-detect-sentiment \
    --endpoint endpoint \
    --region region \
    --cli-input-json file://path to input file/process.json
```

### 를 사용한 배치 처리 AWS SDK for .NET
<a name="batch-csharp"></a>

다음 샘플 프로그램은 SDK for .NET로 [BatchDetectEntities](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_BatchDetectEntities.html) 작업을 사용하는 방법을 보여줍니다. 서버의 응답에는 성공적으로 처리된 각 문서에 대한 [BatchDetectEntitiesItemResult](https://docs.aws.amazon.com/comprehend/latest/APIReference/API_BatchDetectEntitiesItemResult.html) 객체가 포함됩니다. 문서를 처리할 때 오류가 발생한 경우 응답의 오류 목록에 기록이 있습니다. 이 예제에서는 오류가 있는 각 문서를 가져와서 재전송합니다.

이 단원의 .NET 예제는 [AWS SDK for .NET](https://docs.aws.amazon.com/sdk-for-net/latest/developer-guide/welcome.html)을 사용합니다. 를 사용하여 .NET[AWS Toolkit for Visual Studio](https://docs.aws.amazon.com/AWSToolkitVS/latest/UserGuide/welcome.html)을 사용하는 AWS 애플리케이션을 개발할 수 있습니다. 여기에는 애플리케이션 배포 및 서비스 관리를 위한 유용한 템플릿과 AWS Explorer가 포함되어 있습니다. .NET 개발자의 관점은 .NET 개발자 안내서를 AWS참조하세요. [AWS](https://docs.aws.amazon.com/sdk-for-net/latest/developer-guide/welcome.html) 

```
using System;
using System.Collections.Generic;
using Amazon.Comprehend;
using Amazon.Comprehend.Model;

namespace Comprehend
{
    class Program
    {
        // Helper method for printing properties
        static private void PrintEntity(Entity entity)
        {
            Console.WriteLine("     Text: {0}, Type: {1}, Score: {2}, BeginOffset: {3} EndOffset: {4}",
                entity.Text, entity.Type, entity.Score, entity.BeginOffset, entity.EndOffset);
        }

        static void Main(string[] args)
        {
            AmazonComprehendClient comprehendClient = new AmazonComprehendClient(Amazon.RegionEndpoint.USWest2);

            List<String> textList = new List<String>()
            {
                { "I love Seattle" },
                { "Today is Sunday" },
                { "Tomorrow is Monday" },
                { "I love Seattle" }
            };

            // Call detectEntities API
            Console.WriteLine("Calling BatchDetectEntities");
            BatchDetectEntitiesRequest batchDetectEntitiesRequest = new BatchDetectEntitiesRequest()
            {
                TextList = textList,
                LanguageCode = "en"
            };
            BatchDetectEntitiesResponse batchDetectEntitiesResponse = comprehendClient.BatchDetectEntities(batchDetectEntitiesRequest);

            foreach (BatchDetectEntitiesItemResult item in batchDetectEntitiesResponse.ResultList)
            {
                Console.WriteLine("Entities in {0}:", textList[item.Index]);
                foreach (Entity entity in item.Entities)
                    PrintEntity(entity);
            }

            // check if we need to retry failed requests
            if (batchDetectEntitiesResponse.ErrorList.Count != 0)
            {
                Console.WriteLine("Retrying Failed Requests");
                List<String> textToRetry = new List<String>();
                foreach(BatchItemError errorItem in batchDetectEntitiesResponse.ErrorList)
                    textToRetry.Add(textList[errorItem.Index]);

                batchDetectEntitiesRequest = new BatchDetectEntitiesRequest()
                {
                    TextList = textToRetry,
                    LanguageCode = "en"
                };

                batchDetectEntitiesResponse = comprehendClient.BatchDetectEntities(batchDetectEntitiesRequest);

                foreach(BatchDetectEntitiesItemResult item in batchDetectEntitiesResponse.ResultList)
                {
                    Console.WriteLine("Entities in {0}:", textList[item.Index]);
                    foreach (Entity entity in item.Entities)
                        PrintEntity(entity);
                }
            }
            Console.WriteLine("End of DetectEntities");
        }
    }
}
```