public class CompareAdornedFiles
extends java.lang.Object
Usage:
java edu.northwestern.at.morphadorner.tools.compareadornedfiles.CompareAdornedFiles oldadorned.xml newadorned.xml diffs.xml
oldadorned.xml -- "Old" unmodified adorned file.
newadorned.xml -- "new" modified version of adorned file.
diffs.xml -- Word differences between two adorned files.
Constructor and Description |
---|
CompareAdornedFiles(java.lang.String oldAdornedFileName,
java.lang.String newAdornedFileName,
java.lang.String changesFileName,
java.io.PrintStream printStream)
Create CompareAdornedFiles.
|
Modifier and Type | Method and Description |
---|---|
protected void |
logAttributeAdditions(WordChangeLog changeLog,
java.lang.String id,
AdornedWordData w)
Log attribute additions for an added word.
|
protected void |
logAttributeDeletions(WordChangeLog changeLog,
java.lang.String id,
AdornedWordData w)
Log attribute deletions for a deleted word.
|
protected boolean |
logAttributeDifferences(WordChangeLog changeLog,
java.lang.String id,
AdornedWordData w1,
AdornedWordData w2)
Log differences in attributes and their values for two adorned words.
|
static void |
main(java.lang.String[] args)
Main program.
|
public CompareAdornedFiles(java.lang.String oldAdornedFileName, java.lang.String newAdornedFileName, java.lang.String changesFileName, java.io.PrintStream printStream) throws java.lang.Exception
oldAdornedFileName
- Old adorned file name.newAdornedFileName
- New adorned file name.changesFileName
- Changes file name.printStream
- Output stream for reporting progress.java.lang.Exception
- in case of error.protected boolean logAttributeDifferences(WordChangeLog changeLog, java.lang.String id, AdornedWordData w1, AdornedWordData w2)
changeLog
- Change log in which to store changes.id
- The word ID.w1
- First "old" adorned word.w2
- Second "new" adorned word.protected void logAttributeAdditions(WordChangeLog changeLog, java.lang.String id, AdornedWordData w)
changeLog
- Change log in which to store changes.id
- The word ID.w
- The added adorned word.protected void logAttributeDeletions(WordChangeLog changeLog, java.lang.String id, AdornedWordData w)
changeLog
- Change log in which to store changes.id
- The word ID.w
- The deleted adorned word.public static void main(java.lang.String[] args)