案例
another delimiter
输入
kitten sittingExpected answer
JSON3- 样本分隔符
- 插入代价
1- 删除代价
1- 替换代价
1
cost zero
输入
kitten
sittingExpected answer
JSON0- 样本分隔符
\n- 插入代价
0- 删除代价
0- 替换代价
0
negative deletion cost
输入
kitten
sittingExpected rejection
Message containsNegative costs are not allowed.- 样本分隔符
\n- 插入代价
1- 删除代价
-1- 替换代价
1
negative insertion cost
输入
kitten
sittingExpected rejection
Message containsNegative costs are not allowed.- 样本分隔符
\n- 插入代价
-1- 删除代价
1- 替换代价
1
negative substitution cost
输入
kitten
sittingExpected rejection
Message containsNegative costs are not allowed.- 样本分隔符
\n- 插入代价
1- 删除代价
1- 替换代价
-1
too few samples
输入
kittenExpected rejection
Message containsIncorrect number of samples. Check your input and/or delimiter.- 样本分隔符
\n- 插入代价
1- 删除代价
1- 替换代价
1
too many samples
输入
kitten
sitting
kitchenExpected rejection
Message containsIncorrect number of samples. Check your input and/or delimiter.- 样本分隔符
\n- 插入代价
1- 删除代价
1- 替换代价
1
varied costs 1
输入
kitten
sittingExpected answer
JSON230- 样本分隔符
\n- 插入代价
10- 删除代价
100- 替换代价
1000
varied costs 2
输入
kitten
sittingExpected answer
JSON1020- 样本分隔符
\n- 插入代价
1000- 删除代价
100- 替换代价
10
Wikipedia example 1
输入
kitten
sittingExpected answer
JSON3- 样本分隔符
\n- 插入代价
1- 删除代价
1- 替换代价
1
参数
| 参数 | 默认值 | 输入与选项 |
|---|---|---|
| 样本分隔符 | "\\n" | 支持 \n、\r 和 \t 等转义序列 |
| 插入代价 | 1 | 数字 |
| 删除代价 | 1 | 数字 |
| 替换代价 | 1 | 数字 |