テキスト分割コグニティブ スキル
テキスト分割スキルは、テキストをテキストのチャンクに分割します。 テキストを特定の長さの文章またはページに分割するかどうかを指定できます。 このスキルは、他のスキル ダウンストリームでテキストの最大長の要件がある場合に、特に便利です。
注意
このスキルは、Azure AI サービスにバインドされていません。 課金対象外であり、Azure AI サービスのキー要件はありません。
@odata.type
Microsoft.Skills.Text.SplitSkill
スキルのパラメーター
パラメーターの大文字と小文字は区別されます。
パラメーター名 | 説明 |
---|---|
textSplitMode |
pages または sentences のいずれか |
maximumPageLength |
textSplitMode が pages に設定されている場合にのみ適用されます。 これは、String.Length で計測される最大ページ長を文字数で表します。 最小値は 300、最大値は 100000、既定値は 5000 です。 アルゴリズムではできる限り文章の境界でテキストを分割しようとするため、各チャンクのサイズは maximumPageLength より若干小さくなる可能性があります。 |
defaultLanguageCode |
(省略可能) 次の言語コードのいずれか: am, bs, cs, da, de, en, es, et, fr, he, hi, hr, hu, fi, id, is, it, ja, ko, lv, no, nl, pl, pt-PT, pt-BR, ru, sk, sl, sr, sv, tr, ur, zh-Hans 。 既定値は英語 (en) です。 次の考慮事項があります。
|
スキルの入力
パラメーター名 | 説明 |
---|---|
text |
部分文字列に分割するテキスト。 |
languageCode |
(省略可能) ドキュメントの言語コード。 言語がわからない場合 (つまり、入力用のテキストを LanguageDetectionSkill に分割する必要がある場合)、この入力を削除すると安全です。 上記の defaultLanguageCode パラメーターのサポート対象の一覧にその言語がない場合は、警告が出力され、テキストは分割されません。 |
スキルの出力
パラメーター名 | 説明 |
---|---|
textItems |
抽出された部分文字列の配列。 |
定義例
{
"@odata.type": "#Microsoft.Skills.Text.SplitSkill",
"textSplitMode" : "pages",
"maximumPageLength": 1000,
"defaultLanguageCode": "en",
"inputs": [
{
"name": "text",
"source": "/document/content"
},
{
"name": "languageCode",
"source": "/document/language"
}
],
"outputs": [
{
"name": "textItems",
"targetName": "mypages"
}
]
}
サンプル入力
{
"values": [
{
"recordId": "1",
"data": {
"text": "This is the loan application for Joe Romero, a Microsoft employee who was born in Chile and who then moved to Australia...",
"languageCode": "en"
}
},
{
"recordId": "2",
"data": {
"text": "This is the second document, which will be broken into several pages...",
"languageCode": "en"
}
}
]
}
サンプル出力
{
"values": [
{
"recordId": "1",
"data": {
"textItems": [
"This is the loan…",
"On the second page we…"
]
}
},
{
"recordId": "2",
"data": {
"textItems": [
"This is the second document...",
"On the second page of the second doc…"
]
}
}
]
}
エラーになる場合
言語がサポートされていない場合は、警告が生成されます。