inpro.incremental.processor
Class RMRSComposer

java.lang.Object
  extended by inpro.incremental.PushBuffer
      extended by inpro.incremental.IUModule
          extended by inpro.incremental.processor.RMRSComposer
All Implemented Interfaces:
edu.cmu.sphinx.instrumentation.Resetable, edu.cmu.sphinx.util.props.Configurable

public class RMRSComposer
extends IUModule


Nested Class Summary
private  class RMRSComposer.CandidateAnalysisIUProbabilityComparator
           
static interface RMRSComposer.Resolver
          Interface to call whenever a Formula needs to check if its relations resolve with something in the world.
 
Nested classes/interfaces inherited from class inpro.incremental.IUModule
IUModule.RightBuffer
 
Field Summary
private static java.util.List<java.lang.Integer> compareToGoldValueHistory1Best
          The history of compare-to-gold values of each incremental step with 1best evaluation
private static java.util.List<java.lang.Integer> compareToGoldValueHistory5Best
          The history of compare-to-gold values of each incremental step with 5best evaluation
private static FormulaIU firstUsefulFormulaIU
           
private  java.lang.String gold
          Gold representation, i.e. a string representation of a domain object that a composer/resolver should arrive at
private  java.lang.String goldaction
           
private  double malusNoReference
           
protected  TagParser parser
           
static java.lang.String PROP_GOLD
           
static java.lang.String PROP_MALUS_NO_REFERENCE
           
static java.lang.String PROP_PARSER
           
static java.lang.String PROP_REFERENCE_PRUNING
           
static java.lang.String PROP_RESOLVER
           
static java.lang.String PROP_SEM_MACROS_FILE
           
static java.lang.String PROP_SEM_RULES_FILE
           
static java.lang.String PROP_TAG_LEXICON_FILE
           
private  boolean referencePruning
           
private  RMRSComposer.Resolver resolver
           
private  java.util.Map<java.lang.String,Formula> semanticMacrosLongname
           
private  java.util.Map<java.lang.String,Formula> semanticMacrosShortname
           
private  java.util.Map<java.lang.String,Formula> semanticRules
           
private  java.util.Map<java.lang.String,Variable.Type> semanticTypesOfTags
           
private  java.lang.String semMacrosFile
           
private  java.lang.String semRulesFile
           
private  java.util.Map<CandidateAnalysisIU,FormulaIU> states
           
private  java.lang.String tagLexiconFile
           
 
Fields inherited from class inpro.incremental.IUModule
iulisteners, logger, PROP_HYP_CHANGE_LISTENERS, PROP_LOG_TO_TEDVIEW, PROP_TEDVIEW_LOG_ADDRESS, PROP_TEDVIEW_LOG_PORT, rightBuffer, tedLogAdapter
 
Constructor Summary
RMRSComposer()
           
 
Method Summary
 RMRSComposer.Resolver getResolver()
           
protected  void leftBufferUpdate(java.util.Collection<? extends IU> ius, java.util.List<? extends EditMessage<? extends IU>> edits)
          the method that IU modules must implement
 void newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
           
 void setGold(java.lang.String gold)
          Sets the gold string rep in case one wants to evaluate if a composer/resolver did the right thing.
 
Methods inherited from class inpro.incremental.IUModule
getTime, hypChange, logToTedView
 
Methods inherited from class inpro.incremental.PushBuffer
reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_SEM_MACROS_FILE

@S4String
public static final java.lang.String PROP_SEM_MACROS_FILE
See Also:
Constant Field Values

semMacrosFile

private java.lang.String semMacrosFile

PROP_SEM_RULES_FILE

@S4String
public static final java.lang.String PROP_SEM_RULES_FILE
See Also:
Constant Field Values

semRulesFile

private java.lang.String semRulesFile

PROP_RESOLVER

@S4Component(type=RMRSComposer.Resolver.class,
             mandatory=false)
public static final java.lang.String PROP_RESOLVER
See Also:
Constant Field Values

resolver

private RMRSComposer.Resolver resolver

PROP_PARSER

@S4Component(type=TagParser.class)
public static final java.lang.String PROP_PARSER
See Also:
Constant Field Values

parser

protected TagParser parser

PROP_TAG_LEXICON_FILE

@S4String
public static final java.lang.String PROP_TAG_LEXICON_FILE
See Also:
Constant Field Values

tagLexiconFile

private java.lang.String tagLexiconFile

PROP_MALUS_NO_REFERENCE

@S4Double(defaultValue=0.01)
public static final java.lang.String PROP_MALUS_NO_REFERENCE
See Also:
Constant Field Values

malusNoReference

private double malusNoReference

PROP_REFERENCE_PRUNING

@S4Boolean(defaultValue=true)
public static final java.lang.String PROP_REFERENCE_PRUNING
See Also:
Constant Field Values

referencePruning

private boolean referencePruning

PROP_GOLD

@S4String(defaultValue="")
public static final java.lang.String PROP_GOLD
See Also:
Constant Field Values

gold

private java.lang.String gold
Gold representation, i.e. a string representation of a domain object that a composer/resolver should arrive at


goldaction

private java.lang.String goldaction

semanticMacrosLongname

private java.util.Map<java.lang.String,Formula> semanticMacrosLongname

semanticMacrosShortname

private java.util.Map<java.lang.String,Formula> semanticMacrosShortname

semanticRules

private java.util.Map<java.lang.String,Formula> semanticRules

semanticTypesOfTags

private java.util.Map<java.lang.String,Variable.Type> semanticTypesOfTags

states

private java.util.Map<CandidateAnalysisIU,FormulaIU> states

firstUsefulFormulaIU

private static FormulaIU firstUsefulFormulaIU

compareToGoldValueHistory1Best

private static java.util.List<java.lang.Integer> compareToGoldValueHistory1Best
The history of compare-to-gold values of each incremental step with 1best evaluation


compareToGoldValueHistory5Best

private static java.util.List<java.lang.Integer> compareToGoldValueHistory5Best
The history of compare-to-gold values of each incremental step with 5best evaluation

Constructor Detail

RMRSComposer

public RMRSComposer()
Method Detail

newProperties

public void newProperties(edu.cmu.sphinx.util.props.PropertySheet ps)
                   throws edu.cmu.sphinx.util.props.PropertyException
Specified by:
newProperties in interface edu.cmu.sphinx.util.props.Configurable
Overrides:
newProperties in class IUModule
Throws:
edu.cmu.sphinx.util.props.PropertyException

leftBufferUpdate

protected void leftBufferUpdate(java.util.Collection<? extends IU> ius,
                                java.util.List<? extends EditMessage<? extends IU>> edits)
Description copied from class: IUModule
the method that IU modules must implement

Specified by:
leftBufferUpdate in class IUModule
Parameters:
ius - list of IUs that make up the current hypothesis
edits - a list of edits since the last call

setGold

public void setGold(java.lang.String gold)
Sets the gold string rep in case one wants to evaluate if a composer/resolver did the right thing.

Parameters:
gold - the new gold

getResolver

public RMRSComposer.Resolver getResolver()