Package joshua.discriminative.training.risk_annealer.hypergraph

Examples of joshua.discriminative.training.risk_annealer.hypergraph.FeatureForest


      
       
    for(int sentID=0; sentID < numSentence; sentID ++){
      //System.out.println("#Process sentence " + sent_id);
     
      FeatureForest fForest = hgFactory.nextHG(sentID);
     
      fForest.setFeatureWeights(weightsForTheta);
      fForest.setScale(scalingFactor);
 

      /** Based on a model and a test hypergraph (which provides the topology and feature/risk annotation),
       *  compute the gradient.
       **/
 
View Full Code Here


  }

  @Override
  public void consume(HGAndReferences hgAndRefs) {
   
    FeatureForest fForest = riskAnnotator.riskAnnotationOnHG(hgAndRefs.hg, hgAndRefs.referenceSentences);
   
    fForest.setFeatureWeights(weightsForTheta);
    fForest.setScale(scalingFactor);


    /** Based on a model and a test hypergraph
     * (which provides the topology and feature/risk annotation),
     *  compute the gradient and function value.
View Full Code Here

      
       
    for(int sentID=0; sentID < numSentence; sentID ++){
      //System.out.println("#Process sentence " + sent_id);
     
      FeatureForest fForest = hgFactory.nextHG(sentID);
     
      fForest.setFeatureWeights(weightsForTheta);
      fForest.setScale(scalingFactor);
 

      /** Based on a model and a test hypergraph (which provides the topology and feature/risk annotation),
       *  compute the gradient.
       **/
 
View Full Code Here

  

   public FeatureForest nextHG(int sentID){
    
    //=== feature forests
    FeatureForest fForest;

    if( saveHGInMemory==false){//on disk
      fForest = readOneHGFromDisk();
    }else{//in memory
      fForest = hyperGraphs.get(sentID);
View Full Code Here

  
  
   private void readHGsIntoMemoryAllAtOnce(int numSent){
    initDiskReading();
    for(int i=0; i<numSent; i++){
      FeatureForest fForest = readOneHGFromDisk();
      hyperGraphs.add(fForest);
    }
    finalizeDiskReading();
   }
View Full Code Here

 
  public FeatureForest riskAnnotationOnHG(HyperGraph hg, String refSentStr){

    setupRefAndPrefixAndSurfixTbl(refSentStr);//TODO: should enforce this in parent class   
    return new FeatureForestsplitHG(hg) );
  }
View Full Code Here

  }
 
  public FeatureForest riskAnnotationOnHG(HyperGraph hg, String[] refSentStrs){

    setupRefAndPrefixAndSurfixTbl(refSentStrs);//TODO: should enforce this in parent class   
    return new FeatureForestsplitHG(hg) );
  }
View Full Code Here

TOP

Related Classes of joshua.discriminative.training.risk_annealer.hypergraph.FeatureForest

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.