edu.northwestern.at.morphadorner.tools.tagdiff
Class TagDiff

java.lang.Object
  extended by edu.northwestern.at.morphadorner.tools.tagdiff.TagDiff

public class TagDiff
extends java.lang.Object

Compares two tagged files and reports discrepancies.


Nested Class Summary
(package private) static class TagDiff.TagCount
          Class to hold counts of correct and incorrect tags.
 
Field Summary
protected static java.util.Map<java.lang.String,TagDiff.TagCount> incorrectTags
          Map of incorrect tags and counts.
protected static java.util.Map<java.lang.String,TagDiff.TagCount> tagCounts
          Map of tags along with correct and incorrect counts.
 
Constructor Summary
protected TagDiff()
          Allow overrides but not instantiation.
 
Method Summary
protected static void compareTaggedTexts(java.lang.String taggedFile1, int tagColFile1, java.lang.String taggedFile2, int tagColFile2)
          Compare expected and generated tags.
static void main(java.lang.String[] args)
          Main program.
protected static void updateTagCount(java.util.Map<java.lang.String,TagDiff.TagCount> map, java.lang.String tag, int correct, int incorrect, int comparisonType)
          Update tag counts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

incorrectTags

protected static java.util.Map<java.lang.String,TagDiff.TagCount> incorrectTags
Map of incorrect tags and counts.


tagCounts

protected static java.util.Map<java.lang.String,TagDiff.TagCount> tagCounts
Map of tags along with correct and incorrect counts.

Constructor Detail

TagDiff

protected TagDiff()
Allow overrides but not instantiation.

Method Detail

main

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


updateTagCount

protected static void updateTagCount(java.util.Map<java.lang.String,TagDiff.TagCount> map,
                                     java.lang.String tag,
                                     int correct,
                                     int incorrect,
                                     int comparisonType)
Update tag counts.

Parameters:
map - The map to update.
tag - The tag whose counts should be updated.
correct - # of correct tags.
incorrect - # of incorrect tags.

compareTaggedTexts

protected static void compareTaggedTexts(java.lang.String taggedFile1,
                                         int tagColFile1,
                                         java.lang.String taggedFile2,
                                         int tagColFile2)
                                  throws java.net.MalformedURLException,
                                         java.io.IOException
Compare expected and generated tags.

Parameters:
taggedFile1 - The "correctly" tagged file.
taggedFile2 - The "incorrectly" tagged file.
Throws:
java.net.MalformedURLException
java.io.IOException