Skip to content

Commit 7f1a3fe

Browse files
authored
Merge pull request tesseract4java#49 from tesseract4java/feature/integrate-submodule
Integrate submodule
2 parents 3aabde4 + 334df9d commit 7f1a3fe

124 files changed

Lines changed: 17095 additions & 4 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitmodules

Lines changed: 0 additions & 3 deletions
This file was deleted.

ocrevalUAtion

Lines changed: 0 additions & 1 deletion
This file was deleted.

ocrevalUAtion/AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Rafael C. Carrasco (carrasco@ua.es)

ocrevalUAtion/README.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
ocrevalUAtion [![Build Status](https://secure.travis-ci.org/impactcentre/ocrevalUAtion.png?branch=master)](http://travis-ci.org/impactcentre/ocrevalUAtion)
2+
=============
3+
4+
This set of classes provides basic support to perform the comparison of
5+
two text files: a reference file (a ground-truth document) and a the output from an OCR engine (a text file).
6+
7+
Options for specific behavior include: ignore case, ignore diacritics,
8+
ignore punctuation, ignore stop-words, Unicode and user-defined equivalences between characters.
9+
10+
It can be used with the graphic user interface (GUI) provided, in addition to command line interface usage.
11+
12+
Supported input formats include: plain text, FineReader 10 XML, PAGE XML, ALTO XML and hOCR HTML.
13+
14+
The output generates a report with statistics (including CER and WER error rates)
15+
and a table with the parallell input texts where the differences are highlighted.
16+
17+
A gentle introduction to OCR evaluation and to this tool can be found at https://sites.google.com/site/textdigitisation/
18+
19+
You can download the latest release from [here](https://bintray.com/impactocr/maven/ocrevalUAtion).
20+
21+
Instructions on how to use ocrevalUAtion can be found in the [wiki](https://github.com/impactcentre/ocrevalUAtion/wiki).
22+
23+
24+
25+

ocrevalUAtion/pom.xml

Lines changed: 247 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,247 @@
1+
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
2+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
3+
<modelVersion>4.0.0</modelVersion>
4+
<parent>
5+
<groupId>de.vorb.tesseract</groupId>
6+
<artifactId>tesseract4java</artifactId>
7+
<version>0.3.0-SNAPSHOT</version>
8+
</parent>
9+
<artifactId>ocrevalUAtion</artifactId>
10+
<name>ocrevalUAtion</name>
11+
<packaging>jar</packaging>
12+
<description>OCR Evaluation Tool</description>
13+
<organization>
14+
<name>IMPACT Centre of Competence</name>
15+
<url>http://www.digitisation.eu/</url>
16+
</organization>
17+
<inceptionYear>2009</inceptionYear>
18+
<scm>
19+
<connection>scm:git:https://github.com/impactcentre/ocrevalUAtion.git</connection>
20+
<developerConnection>scm:git:git@github.com:impactcentre/ocrevalUAtion.git</developerConnection>
21+
<url>https://github.com/impactcentre/ocrevalUAtion</url>
22+
<tag>HEAD</tag>
23+
</scm>
24+
<licenses>
25+
<license>
26+
<name>GNU General Public License 2.0</name>
27+
<url>http://www.gnu.org/licenses/gpl-2.0.html</url>
28+
</license>
29+
</licenses>
30+
<properties>
31+
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
32+
<jdk.version>1.6</jdk.version>
33+
</properties>
34+
<build>
35+
<!--finalName>ocrevaluation</finalName-->
36+
<plugins>
37+
<plugin>
38+
<groupId>org.apache.maven.plugins</groupId>
39+
<artifactId>maven-compiler-plugin</artifactId>
40+
<version>3.1</version>
41+
<configuration>
42+
<source>1.6</source>
43+
<target>1.6</target>
44+
<showDeprecation>true</showDeprecation>
45+
</configuration>
46+
</plugin>
47+
<plugin>
48+
<groupId>org.apache.maven.plugins</groupId>
49+
<artifactId>maven-javadoc-plugin</artifactId>
50+
<version>2.9.1</version>
51+
<configuration>
52+
<reportOutputDirectory>${basedir}/api</reportOutputDirectory>
53+
<destDir>api</destDir>
54+
</configuration>
55+
</plugin>
56+
<plugin>
57+
<groupId>org.apache.maven.plugins</groupId>
58+
<artifactId>maven-jar-plugin</artifactId>
59+
<version>2.4</version>
60+
<configuration>
61+
<archive>
62+
<manifest>
63+
<addClasspath>true</addClasspath>
64+
<mainClass>eu.digitisation.input.GUI</mainClass>
65+
</manifest>
66+
</archive>
67+
</configuration>
68+
</plugin>
69+
<plugin>
70+
<artifactId>maven-assembly-plugin</artifactId>
71+
<version>2.4</version>
72+
<configuration>
73+
<finalName>ocrevaluation</finalName>
74+
<descriptorRefs>
75+
<descriptorRef>jar-with-dependencies</descriptorRef>
76+
</descriptorRefs>
77+
<appendAssemblyId>false</appendAssemblyId>
78+
<archive>
79+
<manifest>
80+
<addClasspath>true</addClasspath>
81+
<mainClass>eu.digitisation.input.GUI</mainClass>
82+
</manifest>
83+
</archive>
84+
</configuration>
85+
<executions>
86+
<execution>
87+
<id>make-assembly</id>
88+
<phase>package</phase>
89+
<goals>
90+
<goal>single</goal>
91+
</goals>
92+
</execution>
93+
</executions>
94+
</plugin>
95+
<plugin>
96+
<artifactId>maven-resources-plugin</artifactId>
97+
<version>2.6</version>
98+
<executions>
99+
<execution>
100+
<id>copy-resources</id>
101+
<phase>validate</phase>
102+
<goals>
103+
<goal>copy-resources</goal>
104+
</goals>
105+
<configuration>
106+
<outputDirectory>${basedir}/target</outputDirectory>
107+
<resources>
108+
<resource>
109+
<directory>.</directory>
110+
<filtering>true</filtering>
111+
<includes>
112+
<include>userProperties.xml</include>
113+
</includes>
114+
</resource>
115+
</resources>
116+
</configuration>
117+
</execution>
118+
</executions>
119+
</plugin>
120+
<!--plugin>
121+
<inherited>true</inherited>
122+
<groupId>org.apache.maven.plugins</groupId>
123+
<artifactId>maven-enforcer-plugin</artifactId>
124+
<version>1.3.1</version>
125+
<executions>
126+
<execution>
127+
<id>enforce-maven-3</id>
128+
<goals>
129+
<goal>enforce</goal>
130+
</goals>
131+
<configuration>
132+
<rules>
133+
<requireMavenVersion>
134+
<version>3.0.4</version>
135+
</requireMavenVersion>
136+
</rules>
137+
<fail>true</fail>
138+
</configuration>
139+
</execution>
140+
</executions>
141+
</plugin-->
142+
<!--plugin>
143+
<groupId>org.apache.maven.plugins</groupId>
144+
<artifactId>maven-shade-plugin</artifactId>
145+
<version>2.1</version>
146+
<executions>
147+
<execution>
148+
<phase>package</phase>
149+
<goals>
150+
<goal>shade</goal>
151+
</goals>
152+
<configuration>
153+
<minimizeJar>true</minimizeJar>
154+
<promoteTransitiveDependencies>true</promoteTransitiveDependencies>
155+
<filters>
156+
<filter>
157+
<artifact>*:*</artifact>
158+
<excludes>
159+
<exclude>META-INF/*.SF</exclude>
160+
<exclude>META-INF/*.DSA</exclude>
161+
<exclude>META-INF/*.RSA</exclude>
162+
</excludes>
163+
</filter>
164+
<filter>
165+
<artifact>javax.media.jai:*</artifact>
166+
<includes>
167+
<include>**</include>j
168+
</includes>
169+
</filter>
170+
</filters>
171+
<transformers>
172+
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
173+
<mainClass>eu.digitisation.MainGUI</mainClass>
174+
</transformer>
175+
</transformers>
176+
</configuration>
177+
</execution>
178+
</executions>
179+
</plugin-->
180+
<plugin>
181+
<artifactId>maven-deploy-plugin</artifactId>
182+
<version>2.8.1</version>
183+
<configuration>
184+
<altDeploymentRepository>internal.repo::default::file://${project.build.directory}/mvn-repo
185+
</altDeploymentRepository>
186+
</configuration>
187+
</plugin>
188+
</plugins>
189+
</build>
190+
<distributionManagement>
191+
<repository>
192+
<id>internal.repo</id>
193+
<name>Temporary Staging Repository</name>
194+
<url>file://${project.build.directory}/mvn-repo</url>
195+
</repository>
196+
</distributionManagement>
197+
<dependencies>
198+
<dependency>
199+
<groupId>junit</groupId>
200+
<artifactId>junit</artifactId>
201+
<version>4.11</version>
202+
<scope>test</scope>
203+
</dependency>
204+
<!--dependency>
205+
<groupId>org.geotoolkit</groupId>
206+
<artifactId>geotk-coverageio</artifactId>
207+
<version>3.17</version>
208+
</dependency-->
209+
<dependency>
210+
<groupId>javax.media.jai</groupId>
211+
<artifactId>com.springsource.javax.media.jai.core</artifactId>
212+
<version>1.1.3</version>
213+
</dependency>
214+
<dependency>
215+
<groupId>javax.media.jai</groupId>
216+
<artifactId>com.springsource.javax.media.jai.codec</artifactId>
217+
<version>1.1.3</version>
218+
</dependency>
219+
<dependency>
220+
<groupId>org.jsoup</groupId>
221+
<artifactId>jsoup</artifactId>
222+
<version>1.7.2</version>
223+
</dependency>
224+
<dependency>
225+
<groupId>org.apache.tika</groupId>
226+
<artifactId>tika-parsers</artifactId>
227+
<version>1.4</version>
228+
<type>jar</type>
229+
</dependency>
230+
</dependencies>
231+
<repositories>
232+
<!--repository>
233+
<releases />
234+
<snapshots>
235+
<enabled>false</enabled>
236+
</snapshots>
237+
<id>geotoolkit</id>
238+
<name>maven.geotoolkit.org Repository</name>
239+
<url>http://maven.geotoolkit.org/</url>
240+
</repository-->
241+
<repository>
242+
<id>com.springsource.repository.bundles.external</id>
243+
<name>SpringSource Enterprise Bundle Repository - External Bundle Releases</name>
244+
<url>http://repository.springsource.com/maven/bundles/external</url>
245+
</repository>
246+
</repositories>
247+
</project>
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
/*
2+
* Copyright (C) 2013 Universidad de Alicante
3+
*
4+
* This program is free software; you can redistribute it and/or
5+
* modify it under the terms of the GNU General Public License
6+
* as published by the Free Software Foundation; either version 2
7+
* of the License, or (at your option) any later version.
8+
*
9+
* This program is distributed in the hope that it will be useful,
10+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
11+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12+
* GNU General Public License for more details.
13+
*
14+
* You should have received a copy of the GNU General Public License
15+
* along with this program; if not, write to the Free Software
16+
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
17+
*/
18+
package eu.digitisation;
19+
20+
import eu.digitisation.input.SchemaLocationException;
21+
import eu.digitisation.input.WarningException;
22+
import eu.digitisation.text.CharFilter;
23+
import eu.digitisation.text.Text;
24+
import java.io.File;
25+
26+
/**
27+
*
28+
* @author R.C.C
29+
*/
30+
public class File2Text {
31+
32+
public static void main(String[] args) throws WarningException,
33+
SchemaLocationException {
34+
if (args.length > 0) {
35+
File file = new File(args[0]);
36+
CharFilter filter = null;
37+
if (args.length > 1) {
38+
filter = new CharFilter(new File(args[1]));
39+
}
40+
Text content = new Text(file);
41+
System.out.println(content.toString(filter));
42+
}
43+
}
44+
}

0 commit comments

Comments
 (0)