类 TableObjectUtils
java.lang.Object
com.walker.openocr.util.TableObjectUtils
-
构造器概要
构造器 -
方法概要
修饰符和类型方法说明static final booleancontainTableKeyNot(List<TextBlock> dataList, List<String> tableKeysNot) 给定文本集合中,是否包含应该排除的关键词。static final CellObjectfindNextRowCell(CellObject current, List<CellObject> others, int lineHeight, int cellTolerance) 搜索下一行某个确定单元格(列),如:五羊-本田WH125T-9A两 / 轮摩托车static List<CellObject>findNextRowInfo(CellObject current, List<CellObject> others, int lineHeight, int cellTolerance) 找到当前单元格下一行单元格集合static final StringformatText(String text) 格式化识别文本,把必要的中文符号转成英文。static final booleanisInSameRow(CellObject source, CellObject target, int cellTolerance) 两个单元格是否在一行static final StringparseCellTwoLineValue(CellObject currentValue, CellObject nextLineValue, boolean splitTitleValue) 解析两行文本块对应的值。static final StringparseFullRowTwoLineValue(List<CellObject> rowData, CellObject current, List<CellObject> nextLineCells) 解析整行单元格值数据,可能包含两行。static final StringparseSplitTitleAndValue(CellObject cellObject, boolean splitTitleValue) static final voidsortColumnCellList(List<CellObject> list)
-
构造器详细资料
-
TableObjectUtils
public TableObjectUtils()
-
-
方法详细资料
-
containTableKeyNot
给定文本集合中,是否包含应该排除的关键词。1) 例如:标题中不能包含:中油联合,如果包含了则返回true- 参数:
dataList-tableKeysNot-- 返回:
-
formatText
格式化识别文本,把必要的中文符号转成英文。- 参数:
text-- 返回:
-
isInSameRow
两个单元格是否在一行- 参数:
source-target-cellTolerance- 位置像素容差值- 返回:
-
sortColumnCellList
-
findNextRowInfo
public static List<CellObject> findNextRowInfo(CellObject current, List<CellObject> others, int lineHeight, int cellTolerance) 找到当前单元格下一行单元格集合- 参数:
current- 当前单元格(已经匹配配置项)others- 给定集合lineHeight- 定义的每行高度- 返回:
-
findNextRowCell
public static final CellObject findNextRowCell(CellObject current, List<CellObject> others, int lineHeight, int cellTolerance) 搜索下一行某个确定单元格(列),如:五羊-本田WH125T-9A两 / 轮摩托车- 参数:
current- 该单元格不一定是匹配过的,也可能仅是一个存在值的单元格。others-lineHeight-cellTolerance-- 返回:
- 精确返回一个单元格
-
parseSplitTitleAndValue
-
parseFullRowTwoLineValue
public static final String parseFullRowTwoLineValue(List<CellObject> rowData, CellObject current, List<CellObject> nextLineCells) 解析整行单元格值数据,可能包含两行。不包含:多行数据(单独方法处理)- 参数:
rowData- 标题行(有多列)current- 当前标题单元格nextLineCells- 下一行信息- 返回:
-
parseCellTwoLineValue
public static final String parseCellTwoLineValue(CellObject currentValue, CellObject nextLineValue, boolean splitTitleValue) 解析两行文本块对应的值。- 参数:
currentValue- 给定当前值单元格nextLineValue- 找到的下一行同列单元格值- 返回:
-