ABL4J (Alignment Based Learning for Java) - 0.9.7

org.schwiebert.abl4j.cluster
Class AblNtMap

java.lang.Object
  extended by java.util.AbstractMap<K,V>
      extended by java.util.HashMap<NonTerminal,NonTerminal>
          extended by org.schwiebert.abl4j.cluster.AblNtMap
All Implemented Interfaces:
Serializable, Cloneable, Map<NonTerminal,NonTerminal>, NonTerminalsMapping

public class AblNtMap
extends HashMap<NonTerminal,NonTerminal>
implements NonTerminalsMapping

This class contains the mapping from existing NonTerminals in the ITreeBank to new NonTerminals for hypotheses with similar context.

See Also:
Serialized Form

Field Summary
private  Logger logger
           
private static long serialVersionUID
           
private  int upperNtNew
           
 
Constructor Summary
AblNtMap()
          Create a new, empty AblNtMap.
 
Method Summary
 NonTerminal getNewNT(ITree t, IConstituent c, NonTerminal ntOld)
          Associates a given NT with a new NT value if it has not been encountered before and associates this given NT with an existing NT value when it has.
 int getNewNtCount()
          Returns the number of non-terminals that have been created
 int getOldNtCount()
           
 void putNTmapping(NonTerminal ntOld, NonTerminal ntNew)
          Aassociates the first NT provided with the second NT provided
 
Methods inherited from class java.util.HashMap
clear, clone, containsKey, containsValue, entrySet, get, isEmpty, keySet, put, putAll, remove, size, values
 
Methods inherited from class java.util.AbstractMap
equals, hashCode, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.util.Map
equals, hashCode
 

Field Detail

serialVersionUID

private static final long serialVersionUID
See Also:
Constant Field Values

upperNtNew

private int upperNtNew

logger

private Logger logger
Constructor Detail

AblNtMap

public AblNtMap()
Create a new, empty AblNtMap.

Method Detail

getNewNtCount

public int getNewNtCount()
Returns the number of non-terminals that have been created


getOldNtCount

public int getOldNtCount()

getNewNT

public NonTerminal getNewNT(ITree t,
                            IConstituent c,
                            NonTerminal ntOld)
Associates a given NT with a new NT value if it has not been encountered before and associates this given NT with an existing NT value when it has.

Specified by:
getNewNT in interface NonTerminalsMapping

putNTmapping

public void putNTmapping(NonTerminal ntOld,
                         NonTerminal ntNew)
Aassociates the first NT provided with the second NT provided


ABL4J (Alignment Based Learning for Java) - 0.9.7

© 2007 Stephan Schwiebert