--------------------------------------------------------------------------
  CROHMELib (CROHME 2013) v 0.1.1

  Copyright (c) 2012-2013, R. Zanibbi, H. Mouchere
  *Contact information is provided at the bottom of the file.
--------------------------------------------------------------------------

:: License :: 

	These tools are provided in the framework of the ICDAR 2013 CROHME
	competition 'as is' without any guarantee of suitability for non-research
	use.  No commercial use is permitted. The tools are being distributed under
	a Creative Commons license (please see the LICENSE file, and the directory
	cc_license contains a file detailing the specifics of the license).

:: Requirements ::

	Perl (with LibXML), python 2.6/2.7 and TXL (www.txl.ca) are required to run
	the tools included.  LgEval (distributed separately) is also required for
	some of the converter programs. Scripts are written in perl and 
	bash.

:: CROHME 2013 Grammar ::

	grammar_2013/: This directory contains the XML grammar, a human-readable
	version of the same grammar, and a text file listing the symbol classes
	used in the competition in 2013.


----------------------------------
  INSTALLATION  
----------------------------------

Make sure that CROHMELibDir and LgEvalDir are defined in your shell
enviroment, e.g. by including:
	
	export CROHMELibDir=<path_to_CROHMELib> 
	export LgEvalDir=<path_to_LgEval>
	export PATH=$PATH:$CROHMELibDir/bin:$LgEvalDir/bin
 
in your .bashrc file (the initialization file for bash shell). The PATH
alteration will add the tools to your search path.

To avoid warnings about stack sizes from TXL, use the following (using sudo/
as super or root user) from the bash command line:

	ulimit -s 16384

this increases the maximum call stack size for the shell.

--------------------------------------------------------------------------
  Summary of CROHMELib Tools
--------------------------------------------------------------------------

For additional information on the use of these tools, run them without parameters. 

----------------------------------
  CROHME InkML and Grammar Tools
----------------------------------

tokenAndParse.pl
	Used to determine if the expresion in a CROHME .inkml file is legal
	according to a given XML grammar.
		Example usage: 
		tokenAndParse.pl G=GramCROHMEpart4.xml F=inputListOfLatexExpr.txt O=emAccepted.txt

xmlGrammar2txt
	Converts an XML-format CROHME grammar to a human-readable format.

evalInkml_v1.8.pl
	Evaluates CROHME .inkml files using the metrics used in CROHME 2011 and
	2012. This includes some structural metrics not computed by the label graph
	evaluation tools (i.e. STRUCT and REL-1, -2, -3)

startTestPhase.pl
	Script for batch executation of the evalInml_* script.


----------------------------------
  Label Graph Tools
----------------------------------

:: NOTE :: 
Evaluation tools for label graphs are provided in the LgEval library.

mergeLgCrohme
	Convert a label graph (.lg) file to CROHME .inkml file (for viewing, or use
	with inkml-based evaluation scripts), given the .lg file and corresponding
	CROHME .inkml input file. Also calls crohme2lg.pl to also produce
	'normalized' label graph output (see below).

crohme2lg.pl
	Convert a CROHME .inkml file to a (normalized) label graph, with all spatial
	relationships inherited from ancestors in the symbol layout tree. 

convertLgCrohme
	[Batch] Concerts a directory of label graph (.lg) files and CROHME .inkml
	files to CROHME .inkml format.

convertCrohmeLg
	[Batch] Convert a directory of CROHME .inkml files to 'normalized'
	label graph (.lg) files (i.e. with all ancestor relationships inherited in
	the symbol layout tree).
	crohme2lg 

--------------------------------------------------------------------------
  MathBrush Data Set Converters
--------------------------------------------------------------------------

mb2crohme
	Convert a single MathBrush .ink and .tex file pair to a CROHME .inkml file.
	Note that the 

convertMathBrush
	[Batch] Script to convert a directory of MathBrush files to CROHME format. Note:
	files that contain symbols not in CROHME 2013 will not be converted.


--------------------------------
  Contact
--------------------------------

Harold Mouchre
harold.mouchere@univ-nantes.fr
University of Nantes, France

Richard Zanibbi
rlaz@cs.rit.edu
Rochester Institute of Technology, USA
