<commit_before><?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>ocropus</id>
    <name>OCRopus</name>
    <homepage>http://code.google.com/p/ocropus/</homepage>
    <version>0-7</version>
    <installation>
        <os type="linux">
            Available under most distributions via package management.
        </os>
        <os type="windows">
            Currently not supported. See also: https://code.google.com/r/dustin-ocropy-win32/
        </os>
    </installation>
    <services>
        <service sid="1" name="Ocropus" type="migrate" servicepackage="eu.impact_project.iif.service" contextpathprefix="/impactservices">
            <description>Services for text recognition using OCRopus</description>
            <operations>
                <operation oid="1" name="ocropus_nlbin">
                    <description>Perform non-linear binarization on PNG image file</description>
		    <!--

		    ocropus-wrapper [operation] path_to_input path_to_output

		    Use one of the following operations:
			either
			    -bin=nlbin
			    -bin=sauvola
			or
			    -dewarp
			or
			    -segmentation
			or
			    -hocr (only takes zip file..)
			Or use any combination of these flags.


			./ocropus-wrapper -bin=nlbin ./output.png ./out
                    -->
                    <command>ocropus-wrapper -bin=nlbin ${input} ${outputdir}</command>
                    <inputs>
                        <input name="input">
                            <Datatype>xsd:anyURI</Datatype>
                            <Required>true</Required>
                            <CliMapping>input</CliMapping>
                            <Documentation>URL reference to input file in PNG format</Documentation>
			    <Default>http://kbresearch.dyndns.org/testfiles/output.png</Default>
                        </input>
                    </inputs>
                    <outputs>
                        <output name="outputdir">
                            <Datatype>xsd:anyURI</Datatype>
                            <Required>false</Required>
                            <CliMapping>outputdir</CliMapping>
                            <Documentation>URL reference to output directory</Documentation>
                        </output>
                    </outputs>
                </operation>
		<operation oid="2" name="ocropus_ldewarp">
                    <description>Perform dewarping of text lines</description>
                    <command>ocropus-wrapper -dewarp ${input} ${outputdir}</command>
                    <inputs>
                        <input name="input">
                            <Datatype>xsd:anyURI</Datatype>
                            <Required>true</Required>
                            <CliMapping>input</CliMapping>
                            <Documentation>URL reference to input file in PNG format</Documentation>
                            <Default>http://github.com/impactcentre/iif-testfiles/raw/master/testfiles/image.bin.png</Default>
                        </input>
                    </inputs>
                    <outputs>
                        <output name="outputdir">
                            <Datatype>xsd:anyURI</Datatype>
                            <Required>false</Required>
                            <CliMapping>outputdir</CliMapping>
                            <Documentation>URL reference to output</Documentation>
                        </output>
                    </outputs>
                </operation>
				<operation oid="3" name="ocropus_gpageseg">
                    <description>Perform segmentation on bitonal PNG image file</description>
                    <!--
			        ocropus-wrapper -segmentation ./out/0001.bin.png ./out
                    -->
                    <command>ocropus-wrapper -segmentation ${input} ${outputdir}</command>
                    <inputs>
                        <input name="input">
                            <Datatype>xsd:anyURI</Datatype>
                            <Required>true</Required>
                            <CliMapping>input</CliMapping>
                            <Documentation>URL reference to input file in PNG format</Documentation>
                            <Default>http://github.com/impactcentre/iif-testfiles/raw/master/testfiles/image.bin.png</Default>
                        </input>
                    </inputs>
                    <outputs>
                        <output name="outputdir">
                            <Datatype>xsd:anyURI</Datatype>
                            <Required>false</Required>
                            <CliMapping>outputdir</CliMapping>
                            <Documentation>URL reference to output file</Documentation>
			            </output>
		            </outputs>
                </operation>
		        <operation oid="4" name="ocropus_rpred">
		            <description>Perform text recognition on PNG image file(s) and generate hocr file, input file must be directory </description>
                    <!--
			        ocropus-wrapper -hocr ./out/0001 ./out
                    -->
                    <command>ocropus-wrapper -hocr ${input} ${outputdir}</command>
                    <inputs>
                        <input name="inputdir">
                            <Datatype>xsd:anyURI</Datatype>
                            <Required>true</Required>
                            <CliMapping>input</CliMapping>
                            <Documentation>URL reference to input file in PNG format</Documentation>
			                <Default>http://kbresearch.dyndns.org/testfiles/ocropus/</Default>
                        </input>
                    </inputs>
                    <outputs>
                        <output name="outputdir">
                            <Datatype>xsd:anyURI</Datatype>
                            <Required>false</Required>
                            <CliMapping>outputdir</CliMapping>
                            <Documentation>URL reference to output file</Documentation>
                            <Extension>html</Extension>
			            </output>
                    </outputs>
		        </operation>
		        <operation oid="5" name="ocropus_all">
		            <description>Perform all steps on PNG image file and generate hocr file</description>
                    <!--
			        ocropus-wrapper -hocr ./out/0001 ./out
                    -->
                    <command>ocropus-wrapper -all ${input} ${outputdir}</command>
                    <inputs>
                        <input name="input">
                            <Datatype>xsd:anyURI</Datatype>
                            <Required>true</Required>
                            <CliMapping>input</CliMapping>
                            <Documentation>URL reference to input file in PNG format</Documentation>
			                <Default>http://kbresearch.dyndns.org/testfiles/output.png</Default>
                        </input>
                    </inputs>
                    <outputs>
                        <output name="outputdir">
                            <Datatype>xsd:anyURI</Datatype>
                            <Required>false</Required>
                            <CliMapping>outputdir</CliMapping>
                            <Documentation>URL reference to output file</Documentation>
                            <Extension>html</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><PASSWORD>>
                <path>manager</path>
            </manager><commit_msg>ocropus example updated<commit_after><?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>ocropus</id>
    <name>OCRopus</name>
    <homepage>http://code.google.com/p/ocropus/</homepage>
    <version>0-7</version>
    <installation>
        <os type="linux">
            Available under most distributions via package management.
        </os>
        <os type="windows">
            Currently not supported. See also: https://code.google.com/r/dustin-ocropy-win32/
        </os>
    </installation>
    <services>
        <service sid="1" name="Ocropus" type="migrate" servicepackage="eu.impact_project.iif.service" contextpathprefix="/impactservices">
            <description>Services for text recognition using OCRopus</description>
            <operations>
                <operation oid="1" name="ocropus_nlbin">
                    <description>Perform non-linear binarization on PNG image file</description>
				    <!--

				    ocropus-wrapper [operation] path_to_input path_to_output

				    Use one of the following operations:
					either
					    -bin=nlbin
					    -bin=sauvola
					or
					    -dewarp
					or
					    -segmentation
					or
					    -hocr (only takes zip file..)
					Or use any combination of these flags.


					./ocropus-wrapper -bin=nlbin ./output.png ./out
                    -->
                    <command>ocropus-wrapper -bin=nlbin ${input} ${outputdir}</command>
                    <inputs>
                        <input name="input">
                            <Datatype>xsd:anyURI</Datatype>
                            <Required>true</Required>
                            <CliMapping>input</CliMapping>
                            <Documentation>URL reference to input file in PNG format</Documentation>
			    			<Default>http://github.com/impactcentre/iif-testfiles/raw/master/testfiles/image.png</Default>
                        </input>
                    </inputs>
                    <outputs>
                        <output name="outputdir">
                            <Datatype>xsd:anyURI</Datatype>
                            <Required>false</Required>
                            <CliMapping>outputdir</CliMapping>
                            <Documentation>URL reference to output directory</Documentation>
                        </output>
                    </outputs>
                </operation>
				<operation oid="2" name="ocropus_ldewarp">
                    <description>Perform dewarping of text lines</description>
                    <command>ocropus-wrapper -dewarp ${input} ${outputdir}</command>
                    <inputs>
                        <input name="input">
                            <Datatype>xsd:anyURI</Datatype>
                            <Required>true</Required>
                            <CliMapping>input</CliMapping>
                            <Documentation>URL reference to input file in PNG format</Documentation>
                            <Default>http://github.com/impactcentre/iif-testfiles/raw/master/testfiles/image.bin.png</Default>
                        </input>
                    </inputs>
                    <outputs>
                        <output name="outputdir">
                            <Datatype>xsd:anyURI</Datatype>
                            <Required>false</Required>
                            <CliMapping>outputdir</CliMapping>
                            <Documentation>URL reference to output directory</Documentation>
                        </output>
                    </outputs>
                </operation>
				<operation oid="3" name="ocropus_gpageseg">
                    <description>Perform segmentation on bitonal PNG image file</description>
                    <!--
			        ocropus-wrapper -segmentation ./out/0001.bin.png ./out
                    -->
                    <command>ocropus-wrapper -segmentation ${input} ${outputdir}</command>
                    <inputs>
                        <input name="input">
                            <Datatype>xsd:anyURI</Datatype>
                            <Required>true</Required>
                            <CliMapping>input</CliMapping>
                            <Documentation>URL reference to bitonal input file in PNG format</Documentation>
                            <Default>http://github.com/impactcentre/iif-testfiles/raw/master/testfiles/image.bin.png</Default>
                        </input>
                    </inputs>
                    <outputs>
                        <output name="outputdir">
                            <Datatype>xsd:anyURI</Datatype>
                            <Required>false</Required>
                            <CliMapping>outputdir</CliMapping>
                            <Documentation>URL reference to output directory</Documentation>
			            </output>
		            </outputs>
                </operation>
		        <operation oid="4" name="ocropus_rpred">
		            <description>Perform text recognition on PNG image file(s) and generate hocr file, input file must be directory </description>
                    <!--
			        ocropus-wrapper -hocr ./out/0001 ./out
                    -->
                    <command>ocropus-wrapper -hocr ${input} ${outputdir}</command>
                    <inputs>
                        <input name="inputdir">
                            <Datatype>xsd:anyURI</Datatype>
                            <Required>true</Required>
                            <CliMapping>input</CliMapping>
                            <Documentation>URL reference to input directory</Documentation>
			                <Default>http://kbresearch.dyndns.org/testfiles/ocropus/</Default>
                        </input>
                    </inputs>
                    <outputs>
                        <output name="outputdir">
                            <Datatype>xsd:anyURI</Datatype>
                            <Required>false</Required>
                            <CliMapping>outputdir</CliMapping>
                            <Documentation>URL reference to output file</Documentation>
                            <Extension>html</Extension>
			            </output>
                    </outputs>
		        </operation>
		        <operation oid="5" name="ocropus_all">
		            <description>Perform all steps on PNG image file and generate hocr file</description>
                    <!--
			        ocropus-wrapper -hocr ./out/0001 ./out
                    -->
                    <command>ocropus-wrapper -all ${input} ${outputdir}</command>
                    <inputs>
                        <input name="input">
                            <Datatype>xsd:anyURI</Datatype>
                            <Required>true</Required>
                            <CliMapping>input</CliMapping>
                            <Documentation>URL reference to input file in PNG format</Documentation>
			                <Default>http://github.com/impactcentre/iif-testfiles/raw/master/testfiles/image.png</Default>
                        </input>
                    </inputs>
                    <outputs>
                        <output name="outputdir">
                            <Datatype>xsd:anyURI</Datatype>
                            <Required>false</Required>
                            <CliMapping>outputdir</CliMapping>
                            <Documentation>URL reference to output file</Documentation>
                            <Extension>html</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><PASSWORD></password>
                <path>manager</path>
            </manager>
{'fraction_non_alphanumeric': 0.10661831368993653, 'fraction_numerical': 0.005439709882139619, 'mean_word_length': 1.2665753424657533, 'pattern_counts': {'":': 0, '<': 434, '<?xml version=': 2, '>': 435, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1736489', 'n_tokens_mistral': 4310, 'n_tokens_neox': 3839, 'n_words': 708}