it.unimi.di.mg4j.tool
Class PrecomputeAlignments

java.lang.Object
  extended by it.unimi.di.mg4j.tool.PrecomputeAlignments

public class PrecomputeAlignments
extends Object

Precomputes alignments of two parallel texts.

Since:
4.0
Author:
Sebastiano Vigna

Field Summary
protected  QuasiSuccinctIndexWriter indexWriter
          The index writer for the merged index.
protected  int numberOfDocuments
          The overall number of documents.
protected  String outputBasename
          The output basename.
 
Constructor Summary
PrecomputeAlignments(IOFactory ioFactory, String outputBasename, String aligneeBasename, String alignerBasename, ObjectList<? extends CharSequence> terms, long logInterval)
          Precomputes the alignments of two indices.
 
Method Summary
static void main(String[] arg)
           
 void run()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

numberOfDocuments

protected final int numberOfDocuments
The overall number of documents.


outputBasename

protected final String outputBasename
The output basename.


indexWriter

protected QuasiSuccinctIndexWriter indexWriter
The index writer for the merged index.

Constructor Detail

PrecomputeAlignments

public PrecomputeAlignments(IOFactory ioFactory,
                            String outputBasename,
                            String aligneeBasename,
                            String alignerBasename,
                            ObjectList<? extends CharSequence> terms,
                            long logInterval)
                     throws IOException,
                            ConfigurationException,
                            URISyntaxException,
                            ClassNotFoundException,
                            SecurityException,
                            InstantiationException,
                            IllegalAccessException,
                            InvocationTargetException,
                            NoSuchMethodException
Precomputes the alignments of two indices.

Parameters:
ioFactory - the factory that will be used to perform I/O.
outputBasename - the basename of the combined index.
aligneeBasename - the basename of the index to be aligned.
alignerBasename - the basename of the index with which to align.
terms - a sorted list of terms whose alignments will be precomputed, or null for all terms.
logInterval - how often we log.
Throws:
IOException
ConfigurationException
URISyntaxException
ClassNotFoundException
SecurityException
InstantiationException
IllegalAccessException
InvocationTargetException
NoSuchMethodException
Method Detail

run

public void run()
         throws IOException,
                ConfigurationException
Throws:
IOException
ConfigurationException

main

public static void main(String[] arg)
                 throws com.martiansoftware.jsap.JSAPException,
                        ConfigurationException,
                        IOException,
                        URISyntaxException,
                        ClassNotFoundException,
                        SecurityException,
                        InstantiationException,
                        IllegalAccessException,
                        InvocationTargetException,
                        NoSuchMethodException
Throws:
com.martiansoftware.jsap.JSAPException
ConfigurationException
IOException
URISyntaxException
ClassNotFoundException
SecurityException
InstantiationException
IllegalAccessException
InvocationTargetException
NoSuchMethodException