文字任務
10 個節點
本頁內容 10
回答問題
函數Answers a question with the passage of a text that answers it.
回答問題 -> (答案: 文字, 分數: 數字)
問答模型: Question Answerer
問題: 文字
上下文: 文字string AnswerQuestion(
QuestionAnswerer answerer,
string question,
string context,
out double score)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 問答模型 | Question Answerer | — | A question-answering model. |
| 問題 | 文字 | — | The question. |
| 上下文 | 文字 | — | The text the answer is taken from; a long text is read in overlapping windows. |
返回
| 答案 | 文字 |
| 分數 | 數字 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 文字任務
- 所屬包
- 機器學習
文字分類
函數The labels that best describe a text, best first.
文字分類 -> (標籤: 文字陣列, 分數: 數字陣列)
分類器: Text Classifier
文字: 文字
前幾名: 整數string[] ClassifyText(
TextClassifier classifier,
string text,
int top,
out double[] scores)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 分類器 | Text Classifier | — | A text classifier. |
| 文字 | 文字 | — | The text. |
| 前幾名 | 整數 | — | How many labels to give; 0 for all of them. |
返回
| 標籤 | 文字陣列 |
| 分數 | 數字陣列 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 文字任務
- 所屬包
- 機器學習
零樣本文字分類
函數Scores a text against labels written in words, best first.
零樣本文字分類 -> (標籤: 文字陣列, 分數: 數字陣列)
分類器: Zero Shot Text Classifier
文字: 文字
標籤: 文字陣列
範本: 文字
多標籤: 真否string[] ClassifyTextZeroShot(
ZeroShotTextClassifier classifier,
string text,
string[] labels,
string template,
bool multiLabel,
out double[] scores)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 分類器 | Zero Shot Text Classifier | — | A zero-shot text classifier. |
| 文字 | 文字 | — | The text. |
| 標籤 | 文字陣列 | — | The candidate labels, such as "technology", "sports", "cooking". |
| 範本 | 文字 | — | The sentence each label is put into; {} stands for the label. |
| 多標籤 | 真否 | — | Score each label on its own, so several can apply, rather than sharing one probability among them. |
返回
| 標籤 | 文字陣列 |
| 分數 | 數字陣列 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 文字任務
- 所屬包
- 機器學習
填充掩碼
函數The likeliest words for the mask token in a text, best first, with the text each makes.
填充掩碼 -> (候選詞: 文字陣列, 文字: 文字陣列, 分數: 數字陣列)
填充模型: Mask Filler
文字: 文字
前幾名: 整數string[] FillMask(
MaskFiller filler,
string text,
int top,
out string[] texts,
out double[] scores)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 填充模型 | Mask Filler | — | A masked language model. |
| 文字 | 文字 | — | A text with the model's mask token in it once, such as "Paris is the [MASK] of France." |
| 前幾名 | 整數 | — | How many guesses to give. |
返回
| 候選詞 | 文字陣列 |
| 文字 | 文字陣列 |
| 分數 | 數字陣列 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 文字任務
- 所屬包
- 機器學習
載入實體識別器
函數Loads a named-entity recognizer from a Hub repository or a folder.
載入實體識別器 -> Entity Recognizer
模型: 文字
裝置: Compute Device
精度: Precision
後端: Model BackendEntityRecognizer LoadEntityRecognizer(
string model,
ComputeDevice device = ComputeDevice.Auto,
Precision precision = Precision.Auto,
ModelBackend backend = ModelBackend.TorchSharp)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 模型 | 文字 | — | A repository id such as dslim/bert-base-NER, or a folder. |
| 裝置 | Compute Device | 自動 | Where it runs, on TorchSharp. |
| 精度 | Precision | 自動 | The number format of its weights, on TorchSharp. |
| 後端 | Model Backend | TorchSharp | TorchSharp, or the managed ONNX backend on the CPU. |
返回
| 識別器 | Entity Recognizer |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 文字任務
- 所屬包
- 機器學習
載入掩碼填充模型
函數Loads a masked language model from a Hub repository or a folder.
載入掩碼填充模型 -> Mask Filler
模型: 文字
裝置: Compute Device
精度: Precision
後端: Model BackendMaskFiller LoadMaskFiller(
string model,
ComputeDevice device = ComputeDevice.Auto,
Precision precision = Precision.Auto,
ModelBackend backend = ModelBackend.TorchSharp)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 模型 | 文字 | — | A repository id such as distilbert/distilbert-base-uncased or FacebookAI/roberta-base, or a folder. |
| 裝置 | Compute Device | 自動 | Where it runs, on TorchSharp. |
| 精度 | Precision | 自動 | The number format of its weights, on TorchSharp. |
| 後端 | Model Backend | TorchSharp | TorchSharp, or the managed ONNX backend on the CPU. |
返回
| 填充模型 | Mask Filler |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 文字任務
- 所屬包
- 機器學習
載入問答模型
函數Loads an extractive question-answering model from a Hub repository or a folder.
載入問答模型 -> Question Answerer
模型: 文字
裝置: Compute Device
精度: Precision
後端: Model BackendQuestionAnswerer LoadQuestionAnswerer(
string model,
ComputeDevice device = ComputeDevice.Auto,
Precision precision = Precision.Auto,
ModelBackend backend = ModelBackend.TorchSharp)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 模型 | 文字 | — | A repository id such as deepset/roberta-base-squad2, or a folder. |
| 裝置 | Compute Device | 自動 | Where it runs, on TorchSharp. |
| 精度 | Precision | 自動 | The number format of its weights, on TorchSharp. |
| 後端 | Model Backend | TorchSharp | TorchSharp, or the managed ONNX backend on the CPU. |
返回
| 問答模型 | Question Answerer |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 文字任務
- 所屬包
- 機器學習
載入文字分類器
函數Loads a text classifier from a Hub repository or a folder.
載入文字分類器 -> Text Classifier
模型: 文字
裝置: Compute Device
精度: Precision
後端: Model BackendTextClassifier LoadTextClassifier(
string model,
ComputeDevice device = ComputeDevice.Auto,
Precision precision = Precision.Auto,
ModelBackend backend = ModelBackend.TorchSharp)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 模型 | 文字 | — | A repository id such as distilbert/distilbert-base-uncased-finetuned-sst-2-english, or a folder. |
| 裝置 | Compute Device | 自動 | Where it runs, on TorchSharp. |
| 精度 | Precision | 自動 | The number format of its weights, on TorchSharp. |
| 後端 | Model Backend | TorchSharp | TorchSharp, or the managed ONNX backend on the CPU. |
返回
| 分類器 | Text Classifier |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 文字任務
- 所屬包
- 機器學習
載入零樣本文字分類器
函數Loads a zero-shot text classifier (a model trained on natural-language inference) from a Hub repository or a folder.
載入零樣本文字分類器 -> Zero Shot Text Classifier
模型: 文字
裝置: Compute Device
精度: Precision
後端: Model BackendZeroShotTextClassifier LoadZeroShotTextClassifier(
string model,
ComputeDevice device = ComputeDevice.Auto,
Precision precision = Precision.Auto,
ModelBackend backend = ModelBackend.TorchSharp)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 模型 | 文字 | — | A repository id such as MoritzLaurer/xtremedistil-l6-h256-zeroshot-v1.1-all-33, or a folder. |
| 裝置 | Compute Device | 自動 | Where it runs, on TorchSharp. |
| 精度 | Precision | 自動 | The number format of its weights, on TorchSharp. |
| 後端 | Model Backend | TorchSharp | TorchSharp, or the managed ONNX backend on the CPU. |
返回
| 分類器 | Zero Shot Text Classifier |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 文字任務
- 所屬包
- 機器學習
識別實體
函數The names a text mentions and what each is - PER, LOC, ORG, MISC for most English models - in the order they appear.
識別實體 -> (實體: 文字陣列, 型別: 文字陣列, 分數: 數字陣列, 起始: 整數陣列)
識別器: Entity Recognizer
文字: 文字string[] RecognizeEntities(
EntityRecognizer recognizer,
string text,
out string[] types,
out double[] scores,
out int[] starts)參數
| 名稱 | 型別 | 預設值 | 說明 |
|---|---|---|---|
| 識別器 | Entity Recognizer | — | An entity recognizer. |
| 文字 | 文字 | — | The text. |
返回
| 實體 | 文字陣列 |
| 型別 | 文字陣列 |
| 分數 | 數字陣列 |
| 起始 | 整數陣列 |
- 所屬發行版
- 元編程(專業版)
- 可用的圖種類
- 資料流 函數 事件 例程 藍圖 狀態機狀態
- 宣告於
- 文字任務
- 所屬包
- 機器學習