lexicalChain
Class MetaChain

java.lang.Object
  extended by lexicalChain.MetaChain
All Implemented Interfaces:
java.lang.Comparable<java.lang.Object>

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


Field Summary
static double T0_WEIGHT
          Constants
static double T1_WEIGHT_FAR
           
static double T1_WEIGHT_NEAR
           
static double T1_WEIGHT_VICINAL
           
 
Constructor Summary
MetaChain()
          Constructs a new meta chain
MetaChain(java.lang.String head, int start, int sense)
          Constructs a meta chain with a given head, start line number and sense number
 
Method Summary
 void add(java.lang.String word, java.lang.String rel, java.lang.Integer line)
          add Add a word, relation, line number triple to MetaChain
 int compareTo(java.lang.Object obj)
          compareTo Comparison is done according to the score If two chains have the same score, then the line number is used to break the tie, the smaller the line number, the greater the score
 java.lang.String getChainHead()
          Gets chain head
 double getScore()
          getScore Will be more elaborate in the future.
 int getSenseNumber()
          Gets sense number
 int getStartLine()
          Gets start line
 java.util.Iterator<java.lang.Object> iterator()
          returns a new Chain Iterator
 void remove(int index)
          remove Remove a word, relation, line number triple to MetaChain
 java.lang.String toString()
          toString String representation of MetaChain: chainHead, words [score: , sense:, line: ] example: regard, events, reference, event, respect [score: 5, sense: 10, line: 4]
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

T0_WEIGHT

public static final double T0_WEIGHT
Constants

See Also:
Constant Field Values

T1_WEIGHT_NEAR

public static final double T1_WEIGHT_NEAR
See Also:
Constant Field Values

T1_WEIGHT_VICINAL

public static final double T1_WEIGHT_VICINAL
See Also:
Constant Field Values

T1_WEIGHT_FAR

public static final double T1_WEIGHT_FAR
See Also:
Constant Field Values
Constructor Detail

MetaChain

public MetaChain()
Constructs a new meta chain


MetaChain

public MetaChain(java.lang.String head,
                 int start,
                 int sense)
Constructs a meta chain with a given head, start line number and sense number

Parameters:
head -
start -
sense -
Method Detail

add

public void add(java.lang.String word,
                java.lang.String rel,
                java.lang.Integer line)
add Add a word, relation, line number triple to MetaChain

Parameters:
word -
rel -
line -

remove

public void remove(int index)
            throws java.lang.IndexOutOfBoundsException
remove Remove a word, relation, line number triple to MetaChain

Parameters:
index -
Throws:
java.lang.IndexOutOfBoundsException

getChainHead

public java.lang.String getChainHead()
Gets chain head

Returns:
chain head

getStartLine

public int getStartLine()
Gets start line

Returns:
starting line

getSenseNumber

public int getSenseNumber()
Gets sense number

Returns:
sense number

iterator

public java.util.Iterator<java.lang.Object> iterator()
returns a new Chain Iterator

Returns:
iterator

getScore

public double getScore()
getScore Will be more elaborate in the future. Currently it just calculates and returns the Meta Chain's score.


toString

public java.lang.String toString()
toString String representation of MetaChain: chainHead, words [score: , sense:, line: ] example: regard, events, reference, event, respect [score: 5, sense: 10, line: 4]

Overrides:
toString in class java.lang.Object

compareTo

public int compareTo(java.lang.Object obj)
compareTo Comparison is done according to the score If two chains have the same score, then the line number is used to break the tie, the smaller the line number, the greater the score

Specified by:
compareTo in interface java.lang.Comparable<java.lang.Object>