marf.nlp.Parsing.GrammarCompiler
Class ProbabilisticRule

java.lang.Object
  extended by marf.nlp.Parsing.GrammarCompiler.Rule
      extended by marf.nlp.Parsing.GrammarCompiler.ProbabilisticRule
All Implemented Interfaces:
java.io.Serializable

public class ProbabilisticRule
extends Rule

Probabilistic Rule encapsulates a rule of a probabilistic grammar, which is amended with probabilities.

$Id: ProbabilisticRule.java,v 1.10 2005/12/22 00:41:14 mokhov Exp $

Since:
0.3.0.2
Version:
$Revision: 1.10 $
Author:
Serguei Mokhov
See Also:
Serialized Form

Field Summary
protected  double dProbability
          Probability of the rule.
 
Fields inherited from class marf.nlp.Parsing.GrammarCompiler.Rule
iID, oLHS, oRHS
 
Constructor Summary
ProbabilisticRule(NonTerminal poLHS)
          Constructor with the LHS non-terminal set.
 
Method Summary
static java.lang.String getMARFSourceCodeRevision()
          Retrieves class' revision.
 double getProbability()
          Retrieves probability of the rule.
 void setProbability(double pdProbability)
          Sets probability of the rule.
 
Methods inherited from class marf.nlp.Parsing.GrammarCompiler.Rule
addRHSElement, getID, getLHS, getRHS, getRHSFirstSet, setID, setLHS, setRHS, toAbbrString, toString, toStringNumeric
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

dProbability

protected double dProbability
Probability of the rule.

Constructor Detail

ProbabilisticRule

public ProbabilisticRule(NonTerminal poLHS)
Constructor with the LHS non-terminal set.

Parameters:
poLHS -
Method Detail

setProbability

public final void setProbability(double pdProbability)
Sets probability of the rule.

Parameters:
pdProbability - the desired probability

getProbability

public final double getProbability()
Retrieves probability of the rule.

Returns:
current probability value

getMARFSourceCodeRevision

public static java.lang.String getMARFSourceCodeRevision()
Retrieves class' revision.

Returns:
revision string


SourceForge Logo