/
ocrad.xml
110 lines (108 loc) · 5.41 KB
/
ocrad.xml
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
<?xml version="1.0" encoding="UTF-8"?>
<toolspec model="0.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../src/main/resources/toolspec.xsd">
<id>ocrad</id>
<name>Ocrad</name>
<homepage>http://www.gnu.org/s/ocrad/</homepage>
<version>0-17</version>
<installation>
<os type="linux">
Available under most distributions via package management.
</os>
<os type="windows">
Not currently supported.
</os>
</installation>
<services>
<service sid="1" name="Ocrad" type="migrate" servicepackage="eu.impact_project.iif.service" contextpathprefix="/impactservices">
<description>Services for text recognition using GNU Ocrad</description>
<operations>
<operation oid="1" name="ocrad">
<description>Perform text recognition using ocrad</description>
<!--
Usage:
ocrad [options] <input>
Where:
[options]
-h, - - help display this help and exit
-V, - - version output version information and exit
-a, - - append append text to output file
-b, - - block=<n> process only the specified text block
-c, - - charset=<name> try `- - charset=help' for a list of names
-e, - - filter=<name> try `- - filter=help' for a list of names
-f, - - force force overwrite of output file
-F, - - format=<fmt> output format (byte, utf8)
-i, - - invert invert image levels (white on black)
-l, - - layout=<n> layout analysis, 0=none, 1=column, 2=full
-o <file> place the output into <file>
-p, - - crop=<l,t,r,b> crop input image by given rectangle
-s, - - scale=[-]<n> scale input image by [1/]<n>
-t, - - transform=<name> try `- - transform=help' for a list of names
-T, - - threshold=<n%> threshold for binarization (0-100%)
-v, - - verbose be verbose
-x <file> export OCR Results File to <file>
<input> path to input image file(s)
For full documentation of ocrad command line parameters, see
http://www.gnu.org/software/ocrad/manual/ocrad_manual.html
-->
<command>ocrad --format=utf8 --force --layout --output=${output} --export=${result} ${input}</command>
<inputs>
<input name="input">
<Datatype>xsd:anyURI</Datatype>
<Required>true</Required>
<CliMapping>input</CliMapping>
<Documentation>URL reference to image file in PBM, PGM or PPM format</Documentation>
<Default>http://github.com/impactcentre/iif-testfiles/raw/master/testfiles/image.pgm</Default>
</input>
</inputs>
<outputs>
<output name="output">
<Datatype>xsd:anyURI</Datatype>
<Required>false</Required>
<CliMapping>output</CliMapping>
<Documentation>URL reference to output file</Documentation>
<Extension>txt</Extension>
</output>
<output name="result">
<Datatype>xsd:anyURI</Datatype>
<Required>false</Required>
<CliMapping>result</CliMapping>
<Documentation>URL reference to result file</Documentation>
<Extension>orf</Extension>
</output>
</outputs>
</operation>
</operations>
<deployto>
<deployref default="true" ref="local"/>
</deployto>
</service>
</services>
<deployments>
<deployment id="local">
<identifier>http://localhost:8080/impact/instances/tomcat1</identifier>
<host>localhost</host>
<ports>
<port type="http">8080</port>
<port type="https">8043</port>
</ports>
<manager>
<user>tomcat</user>
<password>tomcat</password>
<path>manager</path>
</manager>
<!--
Full path to the directory where the tool has been installed.
THE PATH MUST NOT CONTAIN WHITESPACES!
If you want to use backslashes (\) then you must repeat them twice,
e.g. c:\\foo\\bar
or you can use just slashes,
e.g. c:/foo/bar
-->
<toolsbasedir></toolsbasedir>
<dataexchange>
<accessdir>../webapps/ROOT/impact/tmp/</accessdir>
<accessurl>http://localhost:8080/impact/tmp/</accessurl>
</dataexchange>
</deployment>
</deployments>
</toolspec>