Parsing Engine

danbikel.parser
Class CKYItem.PrevModIsStart

java.lang.Object
  extended by danbikel.parser.Item
      extended by danbikel.parser.CKYItem
          extended by danbikel.parser.CKYItem.PrevModIsStart
All Implemented Interfaces:
SexpConvertible, Serializable, Comparable
Enclosing class:
CKYItem

public static class CKYItem.PrevModIsStart
extends CKYItem

Overrides equals and hashCode methods to take the last previous modifier into account only insofar as its equality to the initial Training.startSym() modifier.

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class danbikel.parser.CKYItem
CKYItem.BaseNPAware, CKYItem.KBestHack, CKYItem.MappedPrevModBaseNPAware, CKYItem.PrevModIsStart
 
Field Summary
protected static Symbol startSym
           
 
Fields inherited from class danbikel.parser.CKYItem
baseNPsCannotContainVerbs, constraint, containsVerb, containsVerbFalse, containsVerbTrue, containsVerbUndefined, end, garbage, headChild, headWord, label, leftChildren, leftPrevMods, leftSubcat, leftVerb, logPrior, logTreeProb, nonTreebankDelimiter, nonTreebankLeftBracket, nonTreebankRightBracket, numParses, numPrevMods, numPrevWords, outputInsideProbs, outputLexLabels, rightChildren, rightPrevMods, rightSubcat, rightVerb, start, stop, stopWord, topSym
 
Fields inherited from class danbikel.parser.Item
logProb
 
Constructor Summary
CKYItem.PrevModIsStart()
           
 
Method Summary
 boolean equals(Object obj)
          Returns true if and only if the specified object is also an instance of a CKYItem and all elements of this CKYItem are equal to those of the specified CKYItem, except their left and right children lists and their log probability values.
 int hashCode()
          Computes the hash code based on all elements used by the equals(java.lang.Object) method.
protected  boolean leftPrevModIsStart()
          Returns whether the previous modifier on the left side is the start symbol.
protected  boolean rightPrevModIsStart()
          Returns whether the previous modifier on the right side is the start symbol.
 
Methods inherited from class danbikel.parser.CKYItem
children, clear, containsVerb, containsVerbRecursive, edgeIndex, end, garbage, getConstraint, getLabel, hasAntecedent, hasEquivalentItem, headChild, headLabel, headWord, headWordIdx, isPreterminal, label, leftChildren, leftPrevMods, leftSubcat, leftVerb, logPrior, logProb, logTreeProb, numLeftChildren, numParses, numRightChildren, prevMods, prevWordsEqual, prevWordsEqual, rightChildren, rightPrevMods, rightSubcat, rightVerb, set, setChildren, setConstraint, setDataFrom, setEdgeIndex, setGarbage, setLabel, setLeftSubcat, setLogPrior, setLogProb, setLogTreeProb, setPrevMods, setRightSubcat, setSideInfo, setSubcat, setVerb, shortBool, shortContainsVerb, start, stop, subcat, toSexp, toSexpInternal, toString, verb
 
Methods inherited from class danbikel.parser.Item
compareTo
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

startSym

protected static final Symbol startSym
Constructor Detail

CKYItem.PrevModIsStart

public CKYItem.PrevModIsStart()
Method Detail

equals

public boolean equals(Object obj)
Returns true if and only if the specified object is also an instance of a CKYItem and all elements of this CKYItem are equal to those of the specified CKYItem, except their left and right children lists and their log probability values.

Overrides:
equals in class CKYItem

leftPrevModIsStart

protected boolean leftPrevModIsStart()
Returns whether the previous modifier on the left side is the start symbol.

Returns:
whether the previous modifier on the left side is the start symbol.

rightPrevModIsStart

protected boolean rightPrevModIsStart()
Returns whether the previous modifier on the right side is the start symbol.

Returns:
whether the previous modifier on the right side is the start symbol.

hashCode

public int hashCode()
Computes the hash code based on all elements used by the equals(java.lang.Object) method.

Overrides:
hashCode in class CKYItem

Parsing Engine

Author: Dan Bikel.