ipipan.spejd.entities
Class Interpretation

java.lang.Object
  extended by ipipan.spejd.entities.Interpretation
All Implemented Interfaces:
java.lang.Comparable<Interpretation>

public class Interpretation
extends java.lang.Object
implements java.lang.Comparable<Interpretation>

A representation of a single morphosyntactic interpretation: lemma, grammatical class, grammatical categories. Additionally it contains data for disambiguation annotation - previous disambiguation (for example read from the input file, ignored during parsing, but preserved for the final output) and current disambiguation (added and used by the parser itself).


Field Summary
static Interpretation[] array
           
static java.lang.String REPLACE_BASE
           
 
Constructor Summary
Interpretation(Interpretation interp, java.lang.String modifier)
          Create an interpretation by modyfying attributes of an existing one.
Interpretation(Interpretation interp, java.lang.String modifier, java.lang.String base)
          Create an interpretation by modifying attributes of an existing one.
Interpretation(java.lang.String s)
          Create an interpretation with the specified data.
Interpretation(java.lang.String s, boolean disamb)
          Create an interpretation with the specified data and preserving previous disambiguation value.
 
Method Summary
 int compareTo(Interpretation i)
           
 void delete()
          Mark the interpretations as deleted (set the disambiguation annotation).
 java.lang.String getBase()
           
 boolean matches(java.util.regex.Pattern pattern)
          Check if the interpretation matches the specified pattern.
 void modify(java.lang.String modifier)
          Modify attributes of an interpretations.
 void printTxt(java.lang.StringBuilder res)
           
 void printXML(java.io.PrintStream out)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REPLACE_BASE

public static final java.lang.String REPLACE_BASE
See Also:
Constant Field Values

array

public static final Interpretation[] array
Constructor Detail

Interpretation

public Interpretation(java.lang.String s)
Create an interpretation with the specified data. Previous disambiguation is set to false, current to true.


Interpretation

public Interpretation(java.lang.String s,
                      boolean disamb)
Create an interpretation with the specified data and preserving previous disambiguation value. Current disambiguation is set to true.


Interpretation

public Interpretation(Interpretation interp,
                      java.lang.String modifier)
Create an interpretation by modyfying attributes of an existing one. Base form (lemma) is copied without modifications.


Interpretation

public Interpretation(Interpretation interp,
                      java.lang.String modifier,
                      java.lang.String base)
Create an interpretation by modifying attributes of an existing one. Base form can be substituted or pre/suffixed.

Method Detail

compareTo

public int compareTo(Interpretation i)
Specified by:
compareTo in interface java.lang.Comparable<Interpretation>

matches

public boolean matches(java.util.regex.Pattern pattern)
Check if the interpretation matches the specified pattern.


delete

public void delete()
Mark the interpretations as deleted (set the disambiguation annotation).


modify

public void modify(java.lang.String modifier)
Modify attributes of an interpretations.


getBase

public java.lang.String getBase()

printTxt

public void printTxt(java.lang.StringBuilder res)

printXML

public void printXML(java.io.PrintStream out)