如何在C#中使用Iron Tesseract
在C#中,Iron Tesseract使用通过创建IronTesseract实例,配置语言和OCR设置,然后对包含图像或PDF的OcrInput对象调用Read()方法。 这将使用Tesseract 5的优化引擎将文本图像转换为可搜索的PDF。
IronOCR 提供了一个直观的 API,用于使用定制和优化的 Tesseract 5,即 Iron Tesseract。 通过使用IronOCR和IronTesseract,您将能够将文本图像和扫描文档转换为文本和可搜索的PDF。 该库支持125种国际语言,并包含条码读取和计算机视觉等高级功能。
此示例演示如何使用特定设置配置IronTesseract并在一行代码中执行OCR。
-
1使用 IronOCR 安装 NuGet Package Manager
-
2复制并运行这段代码。
var result = new IronOcr.IronTesseract { Language = IronOcr.OcrLanguage.English, Configuration = new IronOcr.TesseractConfiguration { ReadBarCodes = false, RenderSearchablePdf = true, WhiteListCharacters = "ABCabc123" } }.Read("image.png");Dim result = New IronOcr.IronTesseract With { .Language = IronOcr.OcrLanguage.English, .Configuration = New IronOcr.TesseractConfiguration With { .ReadBarCodes = False, .RenderSearchablePdf = True, .WhiteListCharacters = "ABCabc123" } }.Read("image.png")Dim result = New IronOcr.IronTesseract With { .Language = IronOcr.OcrLanguage.English, .Configuration = New IronOcr.TesseractConfiguration With { .ReadBarCodes = False, .RenderSearchablePdf = True, .WhiteListCharacters = "ABCabc123" } }.Read("image.png") -
3部署到您的生产环境中进行测试
今天就用免费试用在您的项目中开始使用IronOCR
基本 OCR 工作流程
- 通过NuGet安装OCR库以读取图像
- 利用自定义
Tesseract 5执行 OCR - 加载要处理的文档,例如图像或 PDF 文件
- 将提取的文本输出到控制台或文件
- 将结果保存为可搜索的 PDF
如何创建IronTesseract实例?
用这段代码初始化一个 Tesseract 对象:
using IronOcr;
IronTesseract ocr = new IronTesseract();using IronOcr;
IronTesseract ocr = new IronTesseract();Imports IronOcr
Dim ocr As New IronTesseract()Imports IronOcr
Dim ocr As New IronTesseract()您可以通过选择不同的语言、启用条码读取以及将字符列入白名单/黑名单来自定义IronTesseract的行为。 IronOCR提供全面的配置选项来微调您的OCR流程:
IronTesseract ocr = new IronTesseract
{
Configuration = new TesseractConfiguration
{
ReadBarCodes = false,
RenderHocr = true,
TesseractVariables = null,
WhiteListCharacters = null,
BlackListCharacters = "`ë|^",
},
MultiThreaded = false,
Language = OcrLanguage.English,
EnableTesseractConsoleMessages = true, // False as default
};IronTesseract ocr = new IronTesseract
{
Configuration = new TesseractConfiguration
{
ReadBarCodes = false,
RenderHocr = true,
TesseractVariables = null,
WhiteListCharacters = null,
BlackListCharacters = "`ë|^",
},
MultiThreaded = false,
Language = OcrLanguage.English,
EnableTesseractConsoleMessages = true, // False as default
};Dim ocr As New IronTesseract With {
.Configuration = New TesseractConfiguration With {
.ReadBarCodes = False,
.RenderHocr = True,
.TesseractVariables = Nothing,
.WhiteListCharacters = Nothing,
.BlackListCharacters = "`ë|^"
},
.MultiThreaded = False,
.Language = OcrLanguage.English,
.EnableTesseractConsoleMessages = True
}Dim ocr As New IronTesseract With {
.Configuration = New TesseractConfiguration With {
.ReadBarCodes = False,
.RenderHocr = True,
.TesseractVariables = Nothing,
.WhiteListCharacters = Nothing,
.BlackListCharacters = "`ë|^"
},
.MultiThreaded = False,
.Language = OcrLanguage.English,
.EnableTesseractConsoleMessages = True
}配置完成后,您可以使用Tesseract功能读取OcrInput对象。 OcrInput类提供了加载各种输入格式的灵活方法:
IronTesseract ocr = new IronTesseract();
using OcrInput input = new OcrInput();
input.LoadImage("attachment.png");
OcrResult result = ocr.Read(input);
string text = result.Text;IronTesseract ocr = new IronTesseract();
using OcrInput input = new OcrInput();
input.LoadImage("attachment.png");
OcrResult result = ocr.Read(input);
string text = result.Text;Dim ocr As New IronTesseract()
Using input As New OcrInput()
input.LoadImage("attachment.png")
Dim result As OcrResult = ocr.Read(input)
Dim text As String = result.Text
End UsingDim ocr As New IronTesseract()
Using input As New OcrInput()
input.LoadImage("attachment.png")
Dim result As OcrResult = ocr.Read(input)
Dim text As String = result.Text
End Using对于复杂场景,您可以利用多线程功能同时处理多个文档,大大提高批量操作的性能。 IronTesseract还公开了两个属性,用于限制并行运行的工作量:MaxDegreeOfParallelism限制单个Read调用中并发OCR的页数,MultiThreaded则完全关闭并行读取,以达到最低和最可预测的内存占用。 这些都在异步和多线程指南中详细介绍。
什么是高级Tesseract配置变量?
IronOcr Tesseract接口允许您通过IronOcr.TesseractConfiguration类完全控制Tesseract配置变量。 这些高级设置使您能够针对特定用例优化OCR性能,例如修复低质量扫描或读取特定文档类型。
如何在代码中使用Tesseract配置?
using IronOcr;
using System;
IronTesseract Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.English;
Ocr.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.AutoOsd;
// Configure Tesseract Engine
Ocr.Configuration.TesseractVariables["tessedit_parallelize"] = false;
using var input = new OcrInput();
input.LoadImage("/path/file.png");
OcrResult Result = Ocr.Read(input);
Console.WriteLine(Result.Text);using IronOcr;
using System;
IronTesseract Ocr = new IronTesseract();
Ocr.Language = OcrLanguage.English;
Ocr.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.AutoOsd;
// Configure Tesseract Engine
Ocr.Configuration.TesseractVariables["tessedit_parallelize"] = false;
using var input = new OcrInput();
input.LoadImage("/path/file.png");
OcrResult Result = Ocr.Read(input);
Console.WriteLine(Result.Text);Imports IronOcr
Imports System
Private Ocr As New IronTesseract()
Ocr.Language = OcrLanguage.English
Ocr.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.AutoOsd
' Configure Tesseract Engine
Ocr.Configuration.TesseractVariables("tessedit_parallelize") = False
Dim input = New OcrInput()
input.LoadImage("/path/file.png")
Dim Result As OcrResult = Ocr.Read(input)
Console.WriteLine(Result.Text)Imports IronOcr
Imports System
Private Ocr As New IronTesseract()
Ocr.Language = OcrLanguage.English
Ocr.Configuration.PageSegmentationMode = TesseractPageSegmentationMode.AutoOsd
' Configure Tesseract Engine
Ocr.Configuration.TesseractVariables("tessedit_parallelize") = False
Dim input = New OcrInput()
input.LoadImage("/path/file.png")
Dim Result As OcrResult = Ocr.Read(input)
Console.WriteLine(Result.Text)IronOCR还为不同文档类型提供专门的配置。例如,当读取护照或处理MICR支票时,您可以应用特定的预处理过滤器和区域检测以提高准确性。
财务文件配置示例:
// Example: Configure for financial documents
IronTesseract ocr = new IronTesseract
{
Language = OcrLanguage.English,
Configuration = new TesseractConfiguration
{
PageSegmentationMode = TesseractPageSegmentationMode.SingleBlock,
TesseractVariables = new Dictionary<string, object>
{
["tessedit_char_whitelist"] = "0123456789.$,",
["textord_heavy_nr"] = false,
["edges_max_children_per_outline"] = 10
}
}
};
// Apply preprocessing filters for better accuracy
using OcrInput input = new OcrInput();
input.LoadPdf("financial-document.pdf");
input.Deskew();
input.EnhanceResolution(300);
OcrResult result = ocr.Read(input);// Example: Configure for financial documents
IronTesseract ocr = new IronTesseract
{
Language = OcrLanguage.English,
Configuration = new TesseractConfiguration
{
PageSegmentationMode = TesseractPageSegmentationMode.SingleBlock,
TesseractVariables = new Dictionary<string, object>
{
["tessedit_char_whitelist"] = "0123456789.$,",
["textord_heavy_nr"] = false,
["edges_max_children_per_outline"] = 10
}
}
};
// Apply preprocessing filters for better accuracy
using OcrInput input = new OcrInput();
input.LoadPdf("financial-document.pdf");
input.Deskew();
input.EnhanceResolution(300);
OcrResult result = ocr.Read(input);Imports IronOcr
' Example: Configure for financial documents
Dim ocr As New IronTesseract With {
.Language = OcrLanguage.English,
.Configuration = New TesseractConfiguration With {
.PageSegmentationMode = TesseractPageSegmentationMode.SingleBlock,
.TesseractVariables = New Dictionary(Of String, Object) From {
{"tessedit_char_whitelist", "0123456789.$,"},
{"textord_heavy_nr", False},
{"edges_max_children_per_outline", 10}
}
}
}
' Apply preprocessing filters for better accuracy
Using input As New OcrInput()
input.LoadPdf("financial-document.pdf")
input.Deskew()
input.EnhanceResolution(300)
Dim result As OcrResult = ocr.Read(input)
End UsingImports IronOcr
' Example: Configure for financial documents
Dim ocr As New IronTesseract With {
.Language = OcrLanguage.English,
.Configuration = New TesseractConfiguration With {
.PageSegmentationMode = TesseractPageSegmentationMode.SingleBlock,
.TesseractVariables = New Dictionary(Of String, Object) From {
{"tessedit_char_whitelist", "0123456789.$,"},
{"textord_heavy_nr", False},
{"edges_max_children_per_outline", 10}
}
}
}
' Apply preprocessing filters for better accuracy
Using input As New OcrInput()
input.LoadPdf("financial-document.pdf")
input.Deskew()
input.EnhanceResolution(300)
Dim result As OcrResult = ocr.Read(input)
End Using所有Tesseract配置变量的完整列表是什么?
这些可以使用IronTesseract.Configuration.TesseractVariables["key"] = value;进行设置。 配置变量允许您对 OCR 行为进行微调,以便在处理特定文档时获得最佳效果。 有关优化OCR性能的详细指导,请参阅我们的快速OCR配置指南。
| Tesseract 配置变量 | Default | 意义 |
|---|---|---|
| classify_num_cp_levels | 3 | 类剪枝器级别数 |
| textord_debug_tabfind | 0 | 调试选项卡查找 |
| textord_debug_bugs | 0 | 启用与制表符查找错误相关的输出 |
| textord_testregion_left | -1 | 调试报告矩形的左边缘 |
| textord_testregion_top | -1 | 调试报告矩形的顶部边缘 |
| textord_testregion_right | 2147483647 | 调试矩形的右边缘 |
| textord_testregion_bottom | 2147483647 | 调试矩形的底部边缘 |
| textord_tabfind_show_partitions | 0 | 显示分区边界,如果大于 1 则等待。 |
| devanagari_split_debuglevel | 0 | 拆分 shiro-rekha 进程的调试级别。 |
| edges_max_children_per_outline | 10 | 角色轮廓内子角色的最大数量 |
| edges_max_children_layers | 5 | 角色轮廓内嵌套子角色的最大层数 |
| edges_children_per_grandchild | 10 | 抛掷轮廓的重要性比率 |
| edges_children_count_limit | 45 | 斑点中允许的最大孔数 |
| edges_min_nonhole | 12 | 方框内潜在字符的最小像素 |
| edges_patharea_ratio | 40 | 可接受的儿童轮廓的最大镜头面积/面积 |
| textord_fp_chop_error | 2 | 最大允许的切割单元弯曲度 |
| textord_tabfind_show_images | 0 | 显示图像斑点 |
| textord_skewsmooth_offset | 4 | 对于平滑因子 |
| textord_skewsmooth_offset2 | 1 | 对于平滑因子 |
| textord_test_x | -2147483647 | 测试点坐标 |
| textord_test_y | -2147483647 | 测试点坐标 |
| textord_min_blobs_in_row | 4 | 梯度计数前的最小斑点数 |
| textord_spline_minblobs | 8 | 每个样条曲线段中的最小斑点 |
| textord_spline_medianwin | 6 | 样条分割窗口的大小 |
| textord_max_blob_overlaps | 4 | 一个大斑点可以重叠的最大斑点数量 |
| textord_min_xheight | 10 | 最小可信像素 x 高度 |
| textord_lms_line_trials | 12 | 要进行的线性拟合次数 |
| oldbl_holed_losscount | 10 | 使用备用线路之前的最大损失 |
| pitsync_linear_version | 6 | 使用新的快速算法 |
| pitsync_fake_depth | 1 | 最大程度的伪造 |
| textord_tabfind_show_strokewidths | 0 | 显示笔画宽度 |
| textord_dotmatrix_gap | 3 | 像素间距破损时的最大像素间隙 |
| textord_debug_block | 0 | 阻塞以进行调试 |
| textord_pitch_range | 2 | 球场上的最大射程测试 |
| textord_words_veto_power | 5 | 推翻否决所需的票数 |
| equationdetect_save_bi_image | 0 | 保存输入的双图像 |
| equationdetect_save_spt_image | 0 | 保存特殊字符图像 |
| equationdetect_save_seed_image | 0 | 保存种子图像 |
| equationdetect_save_merged_image | 0 | 保存合并后的图像 |
| poly_debug | 0 | 调试旧多边形 |
| poly_wide_objects_better | 1 | 更精确的近似值适用于宽泛的事物 |
| wordrec_display_splits | 0 | 显示分割 |
| textord_debug_printable | 0 | 使调试窗口可打印 |
| textord_space_size_is_variable | 0 | 如果属实,则假定单词分隔符空格的宽度是可变的,即使字符的间距是固定的。 |
| textord_tabfind_show_initial_partitions | 0 | 显示分区边界 |
| textord_tabfind_show_reject_blobs | 0 | 显示被判定为噪声的斑点 |
| textord_tabfind_show_columns | 0 | 显示列边界 |
| textord_tabfind_show_blocks | 0 | 显示最终区块边界 |
| textord_tabfind_find_tables | 1 | 运行表检测 |
| devanagari_split_debugimage | 0 | 是否为拆分 shiro-rekha 进程创建调试镜像。 |
| textord_show_fixed_cuts | 0 | 绘制固定间距单元格边界 |
| edges_use_new_outline_complexity | 0 | 使用新的大纲复杂度模块 |
| edges_debug | 0 | 启用此模块的调试功能 |
| edges_children_fix | 0 | 移除焦炭状子代的方盒子状父母 |
| gapmap_debug | 0 | 说明哪些区块有表格 |
| gapmap_use_ends | 0 | 在行的开头和结尾留出较大的空间 |
| gapmap_no_isolated_quanta | 0 | 确保间隙宽度不小于 2 量子 |
| textord_heavy_nr | 0 | 强力消除噪音 |
| textord_show_initial_rows | 0 | 显示行累积 |
| textord_show_parallel_rows | 0 | 显示页面相关行 |
| textord_show_expanded_rows | 0 | 展开后显示行 |
| textord_show_final_rows | 0 | 最终拟合后的显示行 |
| textord_show_final_blobs | 0 | 预分配后显示斑点边界 |
| textord_test_landscape | 0 | 测试指的是陆地/港口 |
| textord_parallel_baselines | 1 | 力平行基线 |
| textord_straight_baselines | 0 | 强迫直线底线 |
| textord_old_baselines | 1 | 使用旧的基线算法 |
| textord_old_xheight | 0 | 使用旧的 xheight 算法 |
| textord_fix_xheight_bug | 1 | 使用样条基线 |
| textord_fix_makerow_bug | 1 | 防止出现多个基线 |
| textord_debug_xheights | 0 | 测试 x 高度算法 |
| textord_biased_skewcalc | 1 | 线长度偏差估计 |
| textord_interpolating_skew | 1 | 跨越间隙进行插值 |
| textord_new_initial_xheight | 1 | 使用测试 x 高度机制 |
| textord_debug_blob | 0 | 打印测试斑点信息 |
| textord_really_old_xheight | 0 | 使用原始的wiseowl x高度 |
| textord_oldbl_debug | 0 | 调试旧基线生成 |
| textord_debug_baselines | 0 | 调试基线生成 |
| textord_oldbl_paradef | 1 | 使用默认机制 |
| textord_oldbl_split_splines | 1 | 分裂阶梯样条 |
| textord_oldbl_merge_parts | 1 | 合并可疑分区 |
| oldbl_corrfix | 1 | 提高身高相关性 |
| oldbl_xhfix | 0 | 修复模式阈值中 x 高度的错误 |
| textord_ocropus_mode | 0 | 为蛸蛸建立基线 |
| textord_tabfind_only_strokewidths | 0 | 仅运行笔画宽度 |
| textord_tabfind_show_initialtabs | 0 | 显示标签候选 |
| textord_tabfind_show_finaltabs | 0 | 显示标签页矢量图 |
| textord_show_tables | 0 | 显示表格区域 |
| textord_tablefind_show_mark | 0 | 详细调试表标记步骤 |
| textord_tablefind_show_stats | 0 | 显示用于表格查找的页面统计信息 |
| textord_tablefind_recognize_tables | 0 | 启用表格识别器,用于表格布局和筛选。 |
| textord_all_prop | 0 | 所有文档均为比例文本 |
| textord_debug_pitch_test | 0 | 固定音高测试调试 |
| textord_disable_pitch_test | 0 | 关闭 DP 固定螺距算法 |
| textord_fast_pitch_test | 0 | 实现更快的音调算法 |
| textord_debug_pitch_metric | 0 | 写出完整的公制单位内容 |
| textord_show_row_cuts | 0 | 绘制行级切口 |
| textord_show_page_cuts | 0 | 绘制页面级切口 |
| textord_pitch_cheat | 0 | 使用固定/私有财产的正确答案 |
| textord_blockndoc_fixed | 0 | 尝试整个文档/模块固定音高 |
| textord_show_initial_words | 0 | 显示单独的词语 |
| textord_show_new_words | 0 | 显示单独的词语 |
| textord_show_fixed_words | 0 | 显示强制固定音高词语 |
| textord_blocksall_fixed | 0 | 抱怨支撑块 |
| textord_blocksall_prop | 0 | 抱怨固定螺距块 |
| textord_blocksall_testing | 0 | 抱怨时丢弃统计数据 |
| textord_test_mode | 0 | 进行当前测试 |
| textord_pitch_rowsimilarity | 0.08 | 相同情况下 x 高度的分数 |
| words_initial_lower | 0.5 | 最大初始簇大小 |
| words_initial_upper | 0.15 | 最小初始簇间距 |
| words_default_prop_nonspace | 0.25 | x高度的分数 |
| words_default_fixed_space | 0.75 | x高度的分数 |
| words_default_fixed_limit | 0.6 | 允许的尺寸偏差 |
| textord_words_definite_spread | 0.3 | 非模糊间距区域 |
| textord_spacesize_ratiofp | 2.8 | 最小空间/非空间比率 |
| textord_spacesize_ratioprop | 2 | 最小空间/非空间比率 |
| textord_fpiqr_ratio | 1.5 | 音调四分位距/间隙四分位距阈值 |
| textord_max_pitch_iqr | 0.2 | Xh 分数噪声 |
| textord_fp_min_width | 0.5 | 体面斑点的最小宽度 |
| textord_underline_offset | 0.1 | 要忽略的 x 的比例 |
| ambigs_debug_level | 0 | 单字符歧义的调试级别 |
| classify_debug_level | 0 | 对调试级别进行分类 |
| classify_norm_method | 1 | 归一化方法…… |
| matcher_debug_level | 0 | 匹配器调试级别 |
| matcher_debug_flags | 0 | 匹配器调试标志 |
| classify_learning_debug_level | 0 | 学习调试级别: |
| matcher_permanent_classes_min | 1 | 永久课程的最低数量 |
| matcher_min_examples_for_prototyping | 3 | 可靠配置阈值 |
| 用于原型设计的充分示例匹配器 | 5 | 即使尚未发现歧义,也应启用适应机制。 |
| classify_adapt_proto_threshold | 230 | 自适应 0-255 期间良好原型的阈值 |
| classify_adapt_feature_threshold | 230 | 自适应0-255期间良好特征的阈值 |
| classify_class_pruner_threshold | 229 | 分类修剪器阈值 0-255 |
| classify_class_pruner_multiplier | 15 | 类剪枝器乘数 0-255: |
| classify_cp_cutoff_strength | 7 | 修枝剪剪切强度: |
| classify_integer_matcher_multiplier | 10 | 整数匹配器乘数 0-255: |
| dawg_debug_level | 0 | 设置为 1 显示常规调试信息,设置为 2 显示更多详细信息,设置为 3 显示所有调试消息 |
| hyphen_debug_level | 0 | 连字符单词的调试级别。 |
| stopper_smallword_size | 2 | 字典词的大小将被视为非字典词 |
| stopper_debug_level | 0 | 停止器调试级别 |
| tessedit_truncate_wordchoice_log | 10 | 列表中最多保留多少个单词 |
| max_permuter_attempts | 10000 | 排列组合过程中要考虑的不同字符选择的最大数量。当用户指定模式时,此限制尤其有用,因为过于通用的模式会导致搜索算法探索过多的选项。 |
| repair_unchopped_blobs | 1 | 修复未被切碎的块状物 |
| chop_debug | 0 | 切割调试 |
| chop_split_length | 10000 | 分体式长度 |
| chop_same_distance | 2 | 相同距离 |
| chop_min_outline_points | 6 | 轮廓上的最小点数 |
| chop_seam_pile_size | 150 | seam_pile 中的最大接缝数 |
| chop_inside_angle | -50 | 最小内角弯曲 |
| chop_min_outline_area | 2000 | 最小轮廓区域 |
| chop_centered_maxwidth | 90 | (较小)切碎块的宽度,我们不在乎切碎块是否靠近中心。 |
| chop_x_y_weight | 3 | X/Y 长度重量 |
| wordrec_debug_level | 0 | wordrec 的调试级别 |
| wordrec_max_join_chunks | 4 | 要关联的碎片最大数量 |
| segsearch_debug_level | 0 | SegSearch 调试级别 |
| segsearch_max_pain_points | 2000 | 队列中存储的最大痛点数量 |
| segsearch_max_futile_classifications | 20 | 每个数据块中未能找到更佳词语选择的痛点分类的最大数量。 |
| language_model_debug_level | 0 | 语言模型调试级别 |
| language_model_ngram_order | 8 | 字符n元语法模型的最大阶数 |
| language_model_viterbi_list_max_num_prunable | 10 | BLOB_CHOICEs 中记录的每个维特比列表中可修剪条目(PrunablePath() 为 true 的条目)的最大数量 |
| language_model_viterbi_list_max_size | 500 | BLOB_CHOICEs 中记录的维特比列表的最大大小 |
| language_model_min_compound_length | 3 | 复合词的最小长度 |
| wordrec_display_segmentations | 0 | 显示分段 |
| tessedit_pageseg_mode | 6 | 页面段模式:0=仅 OSD,1=自动+OSD,2=仅自动,3=自动,4=列,5=块垂直,6=块,7=行,8=单词,9=单词圆圈,10=字符,11=稀疏文本,12=稀疏文本+OSD,13=原始行(值来自 tesseract/publictypes.h 中的 PageSegMode 枚举) |
| tessedit_ocr_engine_mode | 2 | 选择要运行的 OCR 引擎(Tesseract、LSTM 或两者都用)。默认情况下会加载并运行最精确的可用引擎。 |
| pageseg_devanagari_split_strategy | 0 | 在对梵文文档进行页面分割时,是否使用顶行分割过程。 |
| ocr_devanagari_split_strategy | 0 | 在对梵文文档进行 OCR 时,是否使用顶行拆分流程? |
| bidi_debug | 0 | 双向调试级别 |
| applybox_debug | 1 | 调试级别 |
| applybox_page | 0 | 要应用方框的页码 |
| tessedit_bigram_debug | 0 | 用于二元语法纠错的调试输出量。 |
| debug_noise_removal | 0 | 调试小轮廓的重新分配 |
| noise_maxperblob | 8 | 应用于某个图形的最大变音符号 |
| noise_maxperword | 16 | 单词可应用的最大变音符号 |
| debug_x_ht_level | 0 | 重新估算调试 |
| quality_min_initial_alphas_reqd | 2 | 好词中的字母 |
| tessedit_tess_adaption_mode | 39 | 用于 TES 的自适应决策算法 |
| multilang_debug_level | 0 | 打印多语言调试信息。 |
| paragraph_debug_level | 0 | 打印段落调试信息。 |
| tessedit_preserve_min_wd_len | 2 | 仅保留 wd 超过此期限 |
| crunch_rating_max | 10 | 每通道评级中的调整长度 |
| crunch_pot_indicators | 1 | 需要多少潜在指标 |
| crunch_leave_lc_strings | 4 | 不要对包含长串小写字母的单词进行压缩 |
| crunch_leave_uc_strings | 4 | 不要对包含长串小写字母的单词进行压缩 |
| crunch_long_repetitions | 3 | 反复咀嚼单词 |
| crunch_debug | 0 | 正如它所说 |
| fixsp_non_noise_limit | 1 | 两侧各有多少个非噪声气泡? |
| fixsp_done_mode | 1 | 间距构成要素是什么? |
| debug_fix_space_level | 0 | 上下文固定空间调试 |
| x_ht_acceptance_tolerance | 8 | 允许的最大偏差范围为斑点顶部超出字体数据范围 |
| x_ht_min_change | 8 | 在实际尝试之前,xht 的最小变化 |
| superscript_debug | 0 | 下标和上标修复器的调试级别 |
| jpg_quality | 85 | 设置 JPEG 质量级别 |
| user_defined_dpi | 0 | 指定输入图像的DPI |
| min_characters_to_try | 50 | 指定 OSD 期间尝试的最小字符数 |
| suspect_level | 99 | 可疑标记水平 |
| suspect_short_words | 2 | 不要怀疑字典单词长度超过这个限制。 |
| tessedit_reject_mode | 0 | 拒绝算法 |
| tessedit_image_border | 2 | 图像边缘附近的 Rej blbs |
| min_sane_x_ht_pixels | 8 | 拒绝任何小于或等于此值的 x-ht 或 eq。 |
| tessedit_page_number | -1 | -1 -> 所有页面,否则指定要处理的页面 |
| tessedit_parallelize | 1 | 尽可能并行运行 |
| lstm_choice_mode | 2 | 允许在 hOCR 输出中包含备选符号选项。有效输入值为 0、1 和 2。默认值为 0。输入值为 1 时,每个时间步的备选符号选项都会被包含在内。输入值为 2 时,备选符号选项将从 CTC 过程而非格中提取。这些选项是按字符映射的。 |
| lstm_choice_iterations | 5 | 设置 lstm_choice_mode 中 Beamsearch 的级联迭代次数。请注意,lstm_choice_mode 的值必须大于 0 才能产生结果。 |
| tosp_debug_level | 0 | 调试数据 |
| tosp_enough_space_samples_for_median | 3 | 或者我们应该用“均值”这个词。 |
| tosp_redo_kern_limit | 10 | 重新估计行所需的样本数 |
| tosp_few_samples | 40 | 无需预留间隙,只需预留一个大间隙即可作为工作台。 |
| tosp_short_row | 20 | 使用证书时,无需预留太多证书空间。 |
| tosp_sanity_method | 1 | 如何避免犯傻 |
| textord_max_noise_size | 7 | 噪声的像素尺寸 |
| textord_baseline_debug | 0 | 基线调试级别 |
| textord_noise_sizefraction | 10 | 最大值所占尺寸的比例 |
| textord_noise_translimit | 16 | 正常斑点的过渡 |
| textord_noise_sncount | 1 | 超级规范块以保存行 |
| use_ambigs_for_adaption | 0 | 利用歧义词来决定是否要改编某个角色 |
| prioritize_division | 0 | 优先考虑块状分割而非切割 |
| classify_enable_learning | 1 | 启用自适应分类器 |
| tess_cn_matching | 0 | 字符归一化匹配 |
| tess_bn_matching | 0 | 基线归一化匹配 |
| classify_enable_adaptive_matcher | 1 | 启用自适应分类器 |
| classify_use_pre_adapted_templates | 0 | 使用预先调整好的分类器模板 |
| classify_save_adapted_templates | 0 | 将修改后的模板保存到文件中 |
| classify_enable_adaptive_debugger | 0 | 启用匹配调试器 |
| classify_nonlinear_norm | 0 | 非线性笔画密度归一化 |
| disable_character_fragments | 1 | 不要将字符片段包含在分类器的结果中 |
| classify_debug_character_fragments | 0 | 为片段训练打开图形调试窗口 |
| matcher_debug_separate_windows | 0 | 使用两个不同的窗口来调试匹配:一个用于原型,一个用于特征。 |
| classify_bln_numeric_mode | 0 | 假设输入为数字 [0-9]。 |
| load_system_dawg | 1 | 加载系统单词 dawg。 |
| load_freq_dawg | 1 | 加载常用词“dawg”。 |
| load_unambig_dawg | 1 | 加载明确的单词 dawg。 |
| load_punc_dawg | 1 | 加载带有标点符号的狗。 |
| load_number_dawg | 1 | 用数字图案加载狗。 |
| load_bigram_dawg | 1 | 用特殊单词组合加载狗。 |
| use_only_first_uft8_step | 0 | 计算对数概率时,仅使用给定字符串的第一个 UTF-8 步长。 |
| stopper_no_acceptable_choices | 0 | 使 AcceptableChoice() 始终返回 false。当需要探索所有细分时非常有用。 |
| segment_nonalphabetic_script | 0 | 不要使用任何字母特有的技巧。对于草书或固有固定音高的脚本,请在 trainingdata 配置文件中将其设置为 true。 |
| save_doc_words | 0 | 保存文档 Words |
| merge_fragments_in_matrix | 1 | 合并评分矩阵中的碎片,合并后删除碎片。 |
| wordrec_enable_assoc | 1 | 关联器使能 |
| force_word_assoc | 0 | 强制关联器运行,无论 enable_assoc 的值是多少。这用于中日韩语,因为中日韩语需要进行组件分组。 |
| chop_enable | 1 | 启用斩波 |
| chop_vertical_creep | 0 | 垂直蠕变 |
| chop_new_seam_pile | 1 | 使用新的缝隙堆 |
| assume_fixed_pitch_char_segment | 0 | 在字符分割中加入固定音调启发式方法 |
| wordrec_skip_no_truth_words | 0 | 仅对 BlamerBundle 中记录为“真实”的词语运行 OCR。 |
| wordrec_debug_blamer | 0 | 打印 blamer 调试信息 |
| wordrec_run_blamer | 0 | 试图找出错误责任人 |
| save_alt_choices | 1 | 保存在分割和分段搜索过程中找到的备选路径 |
| language_model_ngram_on | 0 | 启用/禁用字符n元语法模型 |
| language_model_ngram_use_only_first_uft8_step | 0 | 计算对数概率时,仅使用给定字符串的第一个 UTF-8 步长。 |
| language_model_ngram_space_delimited_language | 1 | 单词之间以空格分隔。 |
| language_model_use_sigmoidal_certainty | 0 | 使用S型曲线评分来评估确定性 |
| tessedit_resegment_from_boxes | 0 | 从盒文件中获取分割和标签 |
| tessedit_resegment_from_line_boxes | 0 | 将单词/行框文件转换为字符框文件 |
| tessedit_train_from_boxes | 0 | 从带框字符生成训练数据 |
| tessedit_make_boxes_from_boxes | 0 | 从带框字符生成更多框 |
| tessedit_train_line_recognizer | 0 | 将输入拆分成行,并重新映射框(如果存在)。 |
| tessedit_dump_pageseg_images | 0 | 转储页面分割过程中生成的中间图像 |
| tessedit_do_invert | 1 | 尝试在LSTMRecognizeWord中反转图像。 |
| tessedit_ambigs_training | 0 | 进行歧义培训 |
| tessedit_adaption_debug | 0 | 生成并打印适配调试信息 |
| applybox_learn_chars_and_char_frags_mode | 0 | 学习字符片段(如在特殊低曝光模式下所做的那样)以及完整的字符。 |
| applybox_learn_ngrams_mode | 0 | 假设每个边界框都包含 n 元语法。仅学习那些轮廓在水平方向上重叠的 n 元语法。 |
| tessedit_display_outwords | 0 | 绘制输出词 |
| tessedit_dump_choices | 0 | 转储字符选择 |
| tessedit_timing_debug | 0 | 打印计时统计数据 |
| tessedit_fix_fuzzy_spaces | 1 | 尝试改进模糊空间 |
| tessedit_unrej_any_wd | 0 | 别费心考虑措辞的合理性了。 |
| tessedit_fix_hyphens | 1 | 双连字符? |
| tessedit_enable_doc_dict | 1 | 将单词添加到文档词典中 |
| tessedit_debug_fonts | 0 | 每个字符输出字体信息 |
| tessedit_debug_block_rejection | 0 | 块和行统计信息 |
| tessedit_enable_bigram_correction | 1 | 启用基于二元词词典的纠错功能。 |
| tessedit_enable_dict_correction | 0 | 启用基于词典的单字纠错功能。 |
| enable_noise_removal | 1 | 当小轮廓线干扰版面分析,导致无法区分变音符号和噪声时,应移除并根据情况重新分配它们。 |
| tessedit_minimal_rej_pass1 | 0 | 对第一遍输出进行最小程度的剔除 |
| tessedit_test_adaption | 0 | 测试适应性标准 |
| test_pt | 0 | 测试点 |
| paragraph_text_based | 1 | 对帖子文本识别进行段落检测(更准确) |
| lstm_use_matrix | 1 | 使用 LSTM 的评级矩阵/束搜索 |
| tessedit_good_quality_unrej | 1 | 减少对优秀文档的拒稿 |
| tessedit_use_reject_spaces | 1 | 拒绝空格? |
| tessedit_preserve_blk_rej_perfect_wds | 1 | 仅 rej 部分拒绝了块拒绝中的单词 |
| tessedit_preserve_row_rej_perfect_wds | 1 | 行拒绝中只有部分拒绝的词 |
| tessedit_dont_blkrej_good_wds | 0 | 使用分词质量指标 |
| tessedit_dont_rowrej_good_wds | 0 | 使用分词质量指标 |
| tessedit_row_rej_good_docs | 1 | 对优秀文档应用行拒绝规则 |
| tessedit_reject_bad_qual_wds | 1 | 拒绝所有劣质wds |
| tessedit_debug_doc_rejection | 0 | 页面统计 |
| tessedit_debug_quality_metrics | 0 | 输出数据到调试文件 |
| bland_unrej | 0 | 未检查的拒绝潜力 |
| unlv_tilde_crunching | 0 | 标记v.坏词用于波浪号压缩 |
| hocr_font_info | 0 | 将字体信息添加到 hocr 输出 |
| hocr_char_boxes | 0 | 将每个字符的坐标添加到 hocr 输出中 |
| crunch_early_merge_tess_fails | 1 | 文字处理之前? |
| crunch_early_convert_bad_unlv_chs | 0 | 提前取出~^? |
| crunch_terrible_garbage | 1 | 正如它所说 |
| crunch_leave_ok_strings | 1 | 不要触碰敏感的弦 |
| crunch_accept_ok | 1 | 在 okstring 中使用可接受性 |
| crunch_leave_accept_strings | 0 | 不要用锅碾碎敏感的弦 |
| crunch_include_numerals | 0 | 小提琴字母 |
| tessedit_prefer_joined_punct | 0 | 奖励标点符号连接 |
| tessedit_write_block_separators | 0 | 在输出中写入块分隔符 |
| tessedit_write_rep_codes | 0 | 编写重复字符代码 |
| tessedit_write_unlv | 0 | 写入 .unlv 输出文件 |
| tessedit_create_txt | 0 | 写入 .txt 输出文件 |
| tessedit_create_hocr | 0 | 写入 .html hOCR 输出文件 |
| tessedit_create_alto | 0 | 写入 .xml ALTO 文件 |
| tessedit_create_lstmbox | 0 | 写入用于 LSTM 训练的 .box 文件 |
| tessedit_create_tsv | 0 | 写入 .tsv 输出文件 |
| tessedit_create_wordstrbox | 0 | 以 WordStr 格式写入 .box 输出文件 |
| tessedit_create_pdf | 0 | 写入 .pdf 输出文件 |
| textonly_pdf | 0 | 创建仅包含一个不可见文本层的 PDF 文件 |
| suspect_constrain_1Il | 0 | UNLV 保留 1Il 字符被拒绝 |
| tessedit_minimal_rejection | 0 | 仅拒绝测试失败 |
| tessedit_zero_rejection | 0 | 不要拒绝任何事 |
| tessedit_word_for_word | 0 | 确保每个 WERD 输出恰好包含一个单词 |
| tessedit_zero_kelvin_rejection | 0 | 什么都不要拒绝 |
| tessedit_rejection_debug | 0 | 适配调试 |
| tessedit_flip_0O | 1 | 上下文 0O O0 翻转 |
| rej_trust_doc_dawg | 0 | 在 11l 配置检测器中使用 DOC dawg |
| rej_1Il_use_dict_word | 0 | 使用字典测试 |
| rej_1Il_trust_permuter_type | 1 | 不要重复检查 |
| rej_use_tess_accepted | 1 | 个体拒绝控制 |
| rej_use_tess_blanks | 1 | 个体拒绝控制 |
| rej_use_good_perm | 1 | 个体拒绝控制 |
| rej_use_sensible_wd | 0 | 扩展、切换、检查 |
| rej_alphas_in_number_perm | 0 | 扩展、切换、检查 |
| tessedit_create_boxfile | 0 | 输出带框的文本 |
| tessedit_write_images | 0 | 从IPE捕获图像 |
| interactive_display_mode | 0 | 以交互方式运行? |
| tessedit_override_permuter | 1 | 根据 dict_word |
| tessedit_use_primary_params_model | 0 | 在多语言模式下,使用主要语言的参数模型 |
| textord_tabfind_show_vlines | 0 | 调试行查找 |
| textord_use_cjk_fp_model | 0 | 采用中日韩固定螺距模型 |
| poly_allow_detailed_fx | 0 | 允许特征提取器查看原始轮廓 |
| tessedit_init_config_only | 0 | 仅使用配置文件进行初始化。如果实例不用于 OCR,而仅用于布局分析等用途,则此方法很有用。 |
| textord_equation_detect | 0 | 开启方程式检测器 |
| textord_tabfind_vertical_text | 1 | 启用垂直检测 |
| textord_tabfind_force_vertical_text | 0 | 强制使用垂直文本页面模式 |
| preserve_interword_spaces | 0 | 保留多个词间空格 |
| pageseg_apply_music_mask | 1 | 检测五线谱并移除交叉部分 |
| textord_single_height_mode | 0 | 脚本没有 x 高度,因此请使用单模式 |
| tosp_old_to_method | 0 | 太空统计数据是否使用预切? |
| tosp_old_to_constrain_sp_kn | 0 | 约束 old_to_method 的词间和词内间隙的相对值。 |
| tosp_only_use_prop_rows | 1 | 块统计数据是否适用于固定间距行? |
| tosp_force_wordbreak_on_punct | 0 | 强制以标点符号断词,以断开非空格分隔语言中的长行 |
| tosp_use_pre_chopping | 0 | 太空统计数据是否使用预切? |
| tosp_old_to_bug_fix | 0 | 修复旧代码中疑似的错误 |
| tosp_block_use_cert_spaces | 1 | 仅统计明显的空间 |
| tosp_row_use_cert_spaces | 1 | 仅统计明显的空间 |
| tosp_narrow_blobs_not_cert | 1 | 仅统计明显的空间 |
| tosp_row_use_cert_spaces1 | 1 | 仅统计明显的空间 |
| tosp_recovery_isolated_row_stats | 1 | 当证书空间不足时,单独使用行。 |
| tosp_only_small_gaps_for_kern | 0 | 更好的猜测 |
| tosp_all_flips_fuzzy | 0 | 将任何翻转传递给上下文? |
| tosp_fuzzy_limit_all | 1 | 不要将 kn->sp 模糊限制限制在表中 |
| textord_no_rejects | 0 | 不要移除噪声块 |
| textord_show_blobs | 0 | 显示未分类的斑点 |
| textord_show_boxes | 0 | 显示未分类的斑点 |
| textord_noise_rejwords | 1 | 拒绝类似噪音的词语 |
| textord_noise_rejrows | 1 | 剔除噪声行 |
| textord_noise_debug | 0 | 调试行垃圾检测器 |
| classify_learn_debug_str | 类 str 用于调试学习 | |
| user_words_file | 用户提供的单词的文件名。 | |
| user_words_suffix | tessdata 中用户提供的单词的后缀。 | |
| user_patterns_file | 用户提供的模式的文件名。 | |
| user_patterns_suffix | tessdata 中用户提供的模式的后缀。 | |
| output_ambig_words_file | 词典中发现的歧义的输出文件 | |
| word_to_debug | 应该将哪个停止器调试信息打印到标准输出的单词 | |
| tessedit_char_blacklist | 不识别字符黑名单 | |
| tessedit_char_whitelist | 要识别的字符白名单 | |
| tessedit_char_unblacklist | 要覆盖 tessedit_char_blacklist 的字符列表 | |
| tessedit_write_params_to_file | 将所有参数写入指定文件。 | |
| applybox_exposure_pattern | .exp | 曝光值在图像文件名中遵循此模式。图像文件名应采用 [lang].[fontname].exp [num].tif 格式。 |
chs_leading_punct('"</td><td>前导标点</td><td></td></tr> <tr><td>chs_trailing_punct1</td><td>).,;:?!</td><td>第一行末尾标点符号 </td></tr> <tr><td>chs_trailing_punct2)'" | 2nd尾随标点 | |
| outlines_odd | %| | 非标准数量的轮廓 |
| outlines_2ij!?%":; | 非标准数量的轮廓 | |
| numeric_punctuation | ., | 标点符号预计在数字范围内 |
| unrecognised_char | | | 未识别斑点的输出字符 |
| ok_repeated_ch_non_alphanum_wds | -?*= | 允许神经网络取消拒绝 |
| conflict_set_I_l_1 | Il1 [] | Il1冲突集 |
| file_type | .tif | 文件扩展名 |
| tessedit_load_sublangs | 要使用此插件加载的语言列表 | |
| page_separator | 页面分隔符(默认为换页控制字符) | |
| classify_char_norm_range | 0.2 | 字符归一化范围... |
| classify_max_rating_ratio | 1.5 | 分类器评级之间的否决比率 |
| classify_max_certainty_margin | 5.5 | 分类器确定性之间的否决差异 |
| matcher_good_threshold | 0.125 | 精彩对决(0-1) |
| matcher_reliable_adaptive_result | 0 | 精彩比赛(0-1) |
| matcher_perfect_threshold | 0.02 | 完美匹配(0-1) |
| matcher_bad_match_pad | 0.15 | 糟糕的比赛垫(0-1) |
| matcher_rating_margin | 0.1 | 新模板边距(0-1) |
| matcher_avg_noise_size | 12 | 平均噪声斑点长度 |
| matcher_clustering_max_angle_delta | 0.015 | 原型聚类的最大角度变化 |
| classify_misfit_junk_penalty | 0 | 当非字母元素垂直偏离其预期的文本行位置时,将适用惩罚。 |
| rating_scale | 1.5 | 评级缩放因子 |
| certainty_scale | 20 | 确定性缩放因子 |
| tessedit_class_miss_scale | 0.00390625 | 未使用特征的比例因子 |
| classify_adapted_pruning_factor | 2.5 | 修剪效果不佳的结果比最佳结果还要糟糕得多 |
| classify_adapted_pruning_threshold | -1 | classify_adapted_pruning_factor 开始的阈值 |
| 分类字符片段垃圾确定性阈值 | -3 | 将看起来不像完整字符的片段从训练和适应过程中排除。 |
| speckle_large_max_size | 0.3 | 最大大斑点尺寸 |
| speckle_rating_penalty | 10 | 噪音处罚将加到最差评级上。 |
| xheight_penalty_subscripts | 0.125 | 如果单词中有下标或上标,则加罚分(0.1 = 10%),否则没问题。 |
| xheight_penalty_inconsistent | 0.25 | 如果 x 高度不一致,则加罚分(0.1 = 10%)。 |
| segment_penalty_dict_frequent_word | 1 | 对于大小写匹配良好且在给定语言中频繁出现的单词,得分倍数(越低越好)。 |
| segment_penalty_dict_case_ok | 1.1 | 区分大小写的单词匹配得分倍数(数值越低越好)。 |
| segment_penalty_dict_case_bad | 1.3125 | 单词匹配的默认得分倍数,可能存在大小写问题(数值越低越好)。 |
| segment_penalty_dict_nonword | 1.25 | 对于与字典词不匹配的字形片段分割结果,得分倍数(数值越低越好)。 |
| certainty_scale | 20 | 确定性缩放因子 |
| stopper_nondict_certainty_base | -2.5 | 非词典词的确定性阈值 |
| stopper_phase2_certainty_rejection_offset | 1 | 拒绝确定性补偿 |
| stopper_certainty_per_char | -0.5 | 确定要为字典中每个大于小单词长度的字符添加内容。 |
| stopper_allowable_character_badness | 3 | 一个词中允许的最大确定性变化(以西格玛为单位) |
| doc_dict_pending_threshold | 0 | 使用待定字典的最差确定性 |
| doc_dict_certainty_threshold | -2.25 | 可插入文档词典的词语的最差确定性 |
| tessedit_certainty_threshold | -2.25 | 良好的斑点限制 |
| chop_split_dist_knob | 0.5 | 分体式长度调节 |
| chop_overlap_knob | 0.9 | 分割重叠调整 |
| chop_center_knob | 0.15 | 分体式中心调节 |
| chop_sharpness_knob | 0.06 | 分割锐度调整 |
| chop_width_change_knob | 5 | 宽度变化调整 |
| chop_ok_split | 100 | OK 分割限制 |
| chop_good_split | 50 | 良好的分摊限额 |
| segsearch_max_char_wh_ratio | 2 | 最大字符宽高比 |
为了获得最佳效果,建议在应用OCR之前使用IronOCR的图像预处理过滤器。 这些过滤器可以显著提高准确性,特别是在处理低质量扫描或像表格这样复杂的文档时。
常见问题
如何在C#中设置Iron Tesseract进行OCR?
要在C#中使用Iron Tesseract,请创建一个IronTesseract实例,使用您所需的语言和OCR设置进行配置,然后在包含您的图像或PDF的OcrInput对象上调用Read()方法。此设置允许有效的文本识别并转换为可搜索的PDF。
Iron Tesseract支持哪些高级功能?
Iron Tesseract基于一个优化的Tesseract 5引擎,支持条码读取、计算机视觉以及多语言OCR处理。它包括如字符白名单/黑名单和可自定义的配置变量,以实现量身定制的OCR过程等功能。
Iron Tesseract能处理多种语言吗?
是的,Iron Tesseract支持125种国际语言的OCR。您可以根据您的文档需求设置语言配置,以实现准确的文本提取。
如何使用Iron Tesseract提高OCR准确性?
要使用Iron Tesseract提高OCR准确性,请利用其图像预处理滤镜。这些滤镜可优化输入图像,特别是在处理低质量的扫描件或复杂的文档布局时,提高OCR结果。
可以使用Iron Tesseract读取条码吗?
可以,您可以配置Iron Tesseract以读取条码。只需在TesseractConfiguration选项中启用条码读取,即可提取条码数据和文本。
如何配置Iron Tesseract以处理财务文件?
要处理财务文件,请配置Iron Tesseract,将PageSegmentationMode设置为SingleBlock,并指定财务文本中常见的数字和符号的字符白名单。应用如校正倾斜和提高分辨率等预处理滤镜以提高准确性。
Iron Tesseract中的多线程作用是什么?
Iron Tesseract中的多线程允许同时处理多个文档,极大地提高了批处理操作的性能,允许从大数据集更快速地提取文本。
如何在Iron Tesseract中将OCR结果保存为可搜索的PDF?
要在Iron Tesseract中将OCR结果保存为可搜索的PDF,确保在TesseractConfiguration中将RenderSearchablePdf设置为true。这会将输出配置为可搜索的PDF,以保留文本布局并增强文档的可访问性。
什么是Tesseract配置变量,它们如何使用?
Iron Tesseract中的Tesseract配置变量允许自定义OCR处理。可以通过IronTesseract.Configuration.TesseractVariables进行设置,使其在修复低质量扫描件或定位特定文档格式的任务中进行优化。
如何使用Iron Tesseract加载进行OCR的图像?
您可以使用OcrInput类在Iron Tesseract中加载OCR所需的图像。该类提供加载各种格式的方法,如PNG、JPEG或PDF,然后可由IronTesseract实例处理以提取和读取文本。
Curtis Chau 拥有卡尔顿大学的计算机科学学士学位,专注于前端开发,精通 Node.js、TypeScript、JavaScript 和 React。他热衷于打造直观且美观的用户界面,喜欢使用现代框架并创建结构良好、视觉吸引力强的手册。