The Ways of GUTime

GUTime-Evita.pl

<inputfile>.tmp1	temporary file, $tmpfile1
<inputfile>.tmp2	temporary file, $tmpfile2
<inputfile>.tmp3	temporary file, $tmpfile3
<inputfile>.tmp4	temporary file, $tmpfile4

1. Gets input file

	Stores file in one variable named $line
	Expects there to be a DCT, in one of several formats
		searches $vfront, $line and $vback for DCT
			(see below for $vfront and $vback explanation)
		routine ExDateTime
		insert empty timex t100 with DCT before TEXT tag
		exit if no DCT was found
	Expects there to be a TEXT tag
		tag name can be edited
		tag can be supplied by user
			(added, 070302)
		tag cannot have attributes
			(fixed this, 070301)
		the DCT has to be outside this tag

2. Creates temporary file <inputfile>.tmp1

	Contains the data between the TEXT opening and closing tag
		kept in $body variable
	Keep other data in two variables:
		$vfront  - opening tag and the material before it
		$vback  - closing tag and the material after it

3. Creates temporary file <inputfile>.tmp2
	
	Takes the $body variable (material in TEXT tag)
	Removes all other tags inside <s> that are not <lex> tags
		Uses Cleanup routine
		adapted for RTE3 data (MV 070302)
	Wraps document in <DOC> tag
	Adds as first element of <DOC> a <DATE_TIME> tag

3. Calls TimeTag on <inputfile>.tmp2

	Command: perl TimeTag.pl $name2 | perl postTempex.pl

	TimeTag.pl is George Wilson's wrapper around Tempex
	postTempex.pl deals with temporal functions
	Removes DOC tag and DATE_TIME tag from result

4. Creates temporary file <inputfile>.tmp3

	Stores result of previous step (that is, the file tagged by Tempex)

5. Merges results from tagging with saved text
	
	Command: perl merge-gutime.pl $tmpfile1 $tmpfile3

	Exits if merging failed	
	Swaps HEAD and TIMEX3 tags
	Moves MAKEINSTANCE tags to the back
		relies on having TimeML tag
		remove this?

6. Creates temporary file <inputfile>.tmp4

	Stores result of previous step

7. Deal with tag order issues

	Command: perl TagOrder.pl $tmpfile4

8. Print final results to STDOUT and remove tmp files.

TimeTag.pl and Tempex.pm

George Wilson's original code

postTempex.pl

Written to deal with TIMEX3 temporal functions.

merge-gutime.pl

Merges GUTime tags into the source.

TagOrder.pl

Deals with putting tags in the right order.