edu.northwestern.at.wordhoard.tools.martin
Class MapGreekPos

java.lang.Object
  extended by edu.northwestern.at.wordhoard.tools.martin.MapGreekPos

public class MapGreekPos
extends java.lang.Object

Maps old to new Greek parts of speech.

Usage:

MapGreekPos oldDir newDir martinData

oldDir = Path to old data dir.

newDir = Path to new data dir.

martinData = Path to data file for Martin's Access database table.

This is a program we wrote to run once, as part of the project to convert WordHoard to Martin's new NUPOS part of speech tagset. While this program is no longer used, we keep it in the source code tree because we may need some kind of similar program some day.

oldDir is the path to the old WordHaord data directory, containing the XML data files for the old part of speech tagset. MapGreekPos reads the old Greek part of speech file in pos/greek-pos.xml and the old EGE corpus work files in works/ege.

newDir is the path to the new WordHoard data directory, containing the XML data files for the new part of speech tagset. MapGreekPos read the new part of speech file in pos.xml and writes new versions the EGE corpus work files in works/ege, with the old pos and lemma tagging data mapped to their new values.

martinData is an output file to which MapGreekPos writes tab-delimited Greek word occurrence tagging data. Martin used this file to populate the NUPOS_GreekData table in his NUPOS Access database.


Method Summary
static void checkIds(java.util.ArrayList list)
          Checks numeric new Greek ids.
static int getDig(org.w3c.dom.Element el, java.lang.String attr, java.lang.String[] vals)
          Gets a Greek id digit.
static void main(java.lang.String[] args)
          The main program.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getDig

public static int getDig(org.w3c.dom.Element el,
                         java.lang.String attr,
                         java.lang.String[] vals)
                  throws java.lang.Exception
Gets a Greek id digit.

Parameters:
el - POS element.
attr - Attribute name.
vals - Array of attribute values in order 1, 2, 3, ...
Returns:
Digit for attribute value.
Throws:
java.lang.Exception

checkIds

public static void checkIds(java.util.ArrayList list)
                     throws java.lang.Exception
Checks numeric new Greek ids.

Parameters:
list - New Greek parts of speech list.
Throws:
java.lang.Exception

main

public static void main(java.lang.String[] args)
The main program.

Parameters:
args - Command line arguments.