---
schema_version: "1"
id: 5ce4e6850ea167ccb8a085dca7929a3f58c1b7afab6da18083b3d7f0c0a99b36
title: 変換操作の設定
collection: mulesoft
version: current
locale: ja-jp
portal_url: https://docs.salesforce.com/mulesoft/current/ja-jp/mulesoft-vectors-connector/1.0/configuring-transform-operations.md
canonical_url: https://docs.mulesoft.com/jp/mulesoft-vectors-connector/1.0/configuring-transform-operations
source_site: docs.mulesoft.com
content_type: documentation
content_hash: f2ffbfac1d77cb95b4ac88f0978e371239a5f879dcbba5e93b8d420272327b34
description: MuleSoft Documentation Site
release: "1.0"
latest: true
---
# 変換操作の設定

**\[Transform\] Parse document**​ および ​**\[Transform\] Chunk text**​ 操作を設定します。

## [](#transform-parse-document-操作の設定)Transform Parse Document 操作の設定

**\[Transform\] Parse document**​ 操作では、未加工のバイナリコンテンツまたは Base64 でエンコードされたコンテンツからドキュメントを解析します。

**\[Transform\] Parse document**​ 操作を設定する手順は、次のとおりです。

Unresolved include directive in modules/ROOT/pages/configuring-transform-operations.adoc - include::connectors::partial$t-configure-operations.adoc\[\] \* **Document binary (ドキュメントバイナリ)**

\+ 解析するドキュメントの未加工のバイナリコンテンツまたは Base64 でエンコードされたコンテンツを入力します。 \* **Document parser (ドキュメントパーサー)**

\+ 使用するドキュメントパーサーを入力します。

この操作の XML を次に示します。

```xml
<ms-vectors:transform-parse-document
  doc:name="[Transform] Parse document"
  doc:id="a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  config-ref="MuleSoft_Vectors_Connector_Document_config"
  documentBinary="<![CDATA[#[payload.documentPath]]]>"
  documentParser="text">
</ms-vectors:transform-parse-document>
```

### [](#出力設定)出力設定

この操作の応答には JSON ペイロードが含まれます。応答の例を次に示します。

```json
{
    "text": "In the modern world, technological advancements have become essential for businesses to remain competitive. E-commerce giants have redefined the retail landscape through innovative use of technology and data analytics.",
    "metadata": {
        "title": "Technology in Business",
        "author": "John Smith",
        "creationDate": "2024-01-15T10:30:00Z",
        "pageCount": 5,
        "wordCount": 1247,
        "fileSize": 245760,
        "documentType": "PDF"
    },
    "extractedAt": "2024-01-20T14:25:30Z",
    "success": true
}
```

- `text`​: ドキュメントから抽出された完全なテキストコンテンツ。
- `metadata`​: ドキュメントプロパティと情報。
    
    - `title`​: ドキュメントタイトル (使用可能な場合)。
    - `author`​: ドキュメント作成者 (使用可能な場合)。
    - `creationDate`​: ドキュメント作成タイムスタンプ。
    - `pageCount`​: ドキュメントのページ数。
    - `wordCount`​: 抽出されたテキスト内の総単語数。
    - `fileSize`​: 元のファイルサイズ (バイト)。
    - `documentType`​: 検出または指定されたドキュメント形式。
- `extractedAt`​: 解析操作が完了したタイムスタンプ。
- `success`​: 解析が正常に完了したかどうかを示すブール値。

## [](#transform-chunk-text-操作の設定)Transform Chunk Text 操作の設定

**\[Transform\] Chunk text**​ 操作では、指定されたテキストをセグメンテーションパラメーターに基づいて複数のセグメントにチャンク化します。この操作では、セグメンテーションパラメーターで指定された最大セグメントサイズと重複サイズに従って、入力テキストをより小さいセグメントに分割します。結果は、チャンク化されたテキストセグメントと関連付けられたメタデータが含まれる JSON ドキュメントとして返されます。

**\[Transform\] Chunk text**​ 操作を設定する手順は、次のとおりです。

Unresolved include directive in modules/ROOT/pages/configuring-transform-operations.adoc - include::connectors::partial$t-configure-operations.adoc\[\] \* **Text (テキスト)**

\+ チャンク化するテキストコンテンツを入力します。 \* **Max Segment Size (Characters) (最大セグメントサイズ (文字数))**

\+ セグメントの最大サイズ (文字数) を入力します。 \* **Max Overlap Size (Characters) (最大重複サイズ (文字数))**

\+ セグメント間の最大重複 (文字数) を入力します。

この操作の XML を次に示します。

```xml
<ms-vectors:transform-chunk-text
  doc:name="[Transform] Chunk text"
  doc:id="b2c3d4e5-f6g7-8901-bcde-f23456789012"
  config-ref="MuleSoft_Vectors_Connector_Document_config"
  text="In the modern world, technological advancements have become essential for businesses to remain competitive. E-commerce giants have redefined the retail landscape through innovative use of technology and data analytics."
  maxSegmentSize="1000"
  maxOverlapSize="100">
</ms-vectors:transform-chunk-text>
```

### [](#出力設定-2)出力設定

この操作の応答には JSON ペイロードが含まれます。応答の例を次に示します。

```json
{
  "chunks": [
    {
      "index": 0,
      "text": "In the modern world, technological advancements have become essential for businesses to remain competitive.",
      "startPosition": 0,
      "endPosition": 198,
      "characterCount": 198
    }
  ],
  "totalChunks": 1,
  "originalLength": 1247,
  "avgChunkSize": 1247,
  "processingTime": "0.125s"
}
```

- `chunks`​: 元のテキストから作成されたテキストセグメントのリスト。
    
    - `index`​: 0 から始まるチャンクの連続番号。
    - `text`​: チャンクの実際のテキストコンテンツ。
    - `startPosition`​: 元のテキスト内でこのチャンクが開始される文字位置。
    - `endPosition`​: 元のテキスト内でこのチャンクが終了する文字位置。
    - `characterCount`​: この特定のチャンク内の文字数。
- `totalChunks`​: 作成されたチャンクの総数。
- `originalLength`​: 元の入力テキストの文字数。
- `avgChunkSize`​: すべてのチャンクの平均文字数。
- `processingTime`​: チャンク操作の完了にかかった時間。

## [](#関連情報)関連情報

- [MuleSoft Vectors Connector の概要](https://docs.mulesoft.com/jp/mulesoft-vectors-connector/1.0/)
- [MuleSoft Vectors Connector リファレンス](https://docs.mulesoft.com/jp/mulesoft-vectors-connector/1.0/mulesoft-vectors-connector-reference)
- [MuleSoft ヘルプセンター](https://help.mulesoft.com)