edu.cmu.sphinx.result
Class Edge

java.lang.Object
  extended byedu.cmu.sphinx.result.Edge

public class Edge
extends java.lang.Object

Edges are part of Lattices. They connect Nodes, and contain the score associated with that sequence.


Method Summary
 double getAcousticScore()
          Get the acoustic score associated with an Edge
 Node getFromNode()
          Get the "from" Node associated with an Edge
 double getLMScore()
          Get the language model score associated with an Edge
 Node getToNode()
          Get the "to" Node associated with an Edge
 boolean isEquivalent(Edge other)
          Returns true if the given edge is equivalent to this edge.
 void setAcousticScore(double v)
          Sets the acoustic score
 void setLMScore(double v)
          Sets the language model score
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public java.lang.String toString()

getAcousticScore

public double getAcousticScore()
Get the acoustic score associated with an Edge

Returns:
the score

getLMScore

public double getLMScore()
Get the language model score associated with an Edge

Returns:
the score

getFromNode

public Node getFromNode()
Get the "from" Node associated with an Edge

Returns:
the Node

getToNode

public Node getToNode()
Get the "to" Node associated with an Edge

Returns:
the Node

setAcousticScore

public void setAcousticScore(double v)
Sets the acoustic score

Parameters:
v - the acoustic score.

setLMScore

public void setLMScore(double v)
Sets the language model score

Parameters:
v - the lm score.

isEquivalent

public boolean isEquivalent(Edge other)
Returns true if the given edge is equivalent to this edge. Two edges are equivalent only if they have their 'fromNode' and 'toNode' are equivalent, and that their acoustic and language scores are the same.

Parameters:
other - the Edge to compare this Edge against
Returns:
true if the Edges are equivalent; false otherwise