---
title: "Google 自然語言理解"
description: "EMILY.RPA Google 自然語言理解模組：使用 Google 雲端 NLU 服務，解析文字檔案中的正負面情緒與強度。"
source: https://docs.emily.tips/wap/txt2sentiment
---

# Google 自然語言理解

使用 Google 雲端 NLU 服務，解析文字檔案中的正負面情緒與強度，input 為 NLU 解析回傳的結果。

![](https://docs.emily.tips/img/zh/wap-281.png)

## 參數

**`TXT FILE`** - 文字輸入檔，點擊「**PICK**」選取檔案、鍵盤輸入工作資料夾中的檔名，或使用 **%FILENAME%** 變數。

## Low-Code 編輯器

### input 物件
```javascript
{
  documentSentiment,  // 整體文件的情緒與強度
  language,           // 指定文件的語言
  sentences           // 句子情緒強度陣列
}
```

input 物件保存 Google NLU 返還的完整結構，參考 [回傳資料結構](https://docs.cloud.google.com/natural-language/docs/reference/rest/v1/documents/analyzeSentiment#response-body)
