-
Notifications
You must be signed in to change notification settings - Fork 32
Expand file tree
/
Copy pathocrd-tool.json
More file actions
67 lines (67 loc) · 3.41 KB
/
Copy pathocrd-tool.json
File metadata and controls
67 lines (67 loc) · 3.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
{
"version": "1.0.0",
"git_url": "https://github.com/OCR-D/core",
"dockerhub": "ocrd/core",
"tools": {
"ocrd-dummy": {
"executable": "ocrd-dummy",
"description": "Bare-bones processor creates PAGE-XML and optionally copies file from input group to output group",
"steps": ["preprocessing/optimization"],
"categories": ["Image preprocessing"],
"input_file_grp_cardinality": 1,
"output_file_grp_cardinality": 1,
"parameters": {
"copy_files": {
"type": "boolean",
"default": false,
"description": "Whether to actually copy files (true) or just create PAGE-XML as a side effect (false)"
}
}
},
"ocrd-filter": {
"executable": "ocrd-filter",
"description": "Bare-bones processor can be dynamically configured to remove segments based on XPath queries",
"steps": ["recognition/post-correction"],
"categories": ["Quality assurance"],
"input_file_grp_cardinality": 1,
"output_file_grp_cardinality": 1,
"parameters": {
"select": {
"type": "string",
"default": "//*[ends-with(local-name(),'Region')]",
"description": "Which segments to select for removal. An XPath 2.0 query expression (path and optional predicates), with 'pc' as namespace prefix for PAGE-XML and our extension functions (see help text). Only selection of segment hierarchy elements is allowed (so e.g. `*` would be equivalent to `pc:NoiseRegion|pc:LineDrawingRegion|pc:AdvertRegion|pc:ImageRegion|pc:ChartRegion|pc:MusicRegion|pc:GraphicRegion|pc:UnknownRegion|pc:CustomRegion|pc:SeparatorRegion|pc:MathsRegion|pc:TextRegion|pc:MapRegion|pc:ChemRegion|pc:TableRegion|pc:TextLine|pc:Word|pc:Glyph`, but `pc:MetadataItem` or `pc:Border` or `pc:Coords` would not match).\nFor example, to remove words or glyphs with low text confidence, select '(pc:Word|pc:Glyph)[pc:TextEquiv/@conf < 0.7]'. Or low layout confidence, '*[pc:Coords/@conf < 0.7]'.\nTo remove high pixel-to-character rate, select '*[pc:pixelarea(.) div string-length(pc:textequiv(.)) > 10000]'."
},
"plot": {
"type": "boolean",
"default": false,
"description": "Whether to extract an image for each filtered segment and write to the output fileGrp."
}
}
},
"ocrd-command": {
"executable": "ocrd-command",
"description": "Bare-bones processor runs shell commands to process PAGE files",
"steps": ["recognition/text-recognition", "recognition/font-identification", "recognition/post-correction", "layout/segmentation", "layout/analysis"],
"categories": [],
"input_file_grp_cardinality": [1, -1],
"output_file_grp_cardinality": 1,
"parameters": {
"command": {
"type": "string",
"default": "cat @INFILE > @OUTFILE",
"description": "Shell command to operate on PAGE files, with @INFILE as place-holder for the input file path(s), and @OUTFILE as place-holder for the output file path. If running on multiple input fileGrps, then @INFILE must be repeated as many times."
}
}
},
"ocrd-merge": {
"executable": "ocrd-merge",
"description": "Bare-bones processor merges annotations from multiple fileGrps",
"steps": ["layout/segmentation"],
"categories": [],
"input_file_grp_cardinality": [1, -1],
"output_file_grp_cardinality": 1,
"parameters": {
}
}
}
}