文本任务
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. |
返回
| 实体 | 文本数组 |
| 类型 | 文本数组 |
| 分数 | 数字数组 |
| 起始 | 整数数组 |
- 所属发行版
- 元编程(专业版)
- 可用的图种类
- 数据流 函数 事件 例程 蓝图 状态机状态
- 声明于
- 文本任务
- 所属包
- 机器学习