Package joshua.decoder.ff

Examples of joshua.decoder.ff.WordPenaltyFF


          logger.info( String.format("vlm feature with weight: " + weight))
         
        }else if(fds[0].compareTo("word_penalty_weight") == 0 && fds.length == 2) {
          double weight = new Double(fds[1].trim());
          System.out.println("word penalty feature");
          FeatureFunction ff =  new WordPenaltyFF(ngramStateID+1+featFunctions.size(), weight);
          featFunctions.add(ff);         
          logger.info( String.format("word penalty feature with weight: " + weight));
         
        }else{
          if (logger.isLoggable(Level.SEVERE))
View Full Code Here


              line, owner, startArity, endArity, weight));
         
        } else if ("wordpenalty".equals(fds[0]) && fds.length == 2) { // wordpenalty weight
          double weight = Double.parseDouble(fds[1].trim());
          this.featureFunctions.add(
            new WordPenaltyFF(
              this.featureFunctions.size(), weight));
          if (logger.isLoggable(Level.FINEST))
            logger.finest(String.format(
              "Process Line: %s\nAdd WordPenalty, weight: %.3f",
              line, weight));
View Full Code Here

          l_models.add(new ArityPhrasePenaltyFF(l_models.size(), weight, owner, start_arity, end_arity));
          if (logger.isLoggable(Level.FINEST))
            logger.finest(String.format("Process Line: %s\nAdd ArityPhrasePenalty, owner: %s; start_arity: %d; end_arity: %d; weight: %.3f",line, owner, start_arity, end_arity, weight));
        } else if (0 == fds[0].compareTo("wordpenalty") && fds.length == 2) { // wordpenalty weight
          double weight = (new Double(fds[1].trim())).doubleValue();
          l_models.add(new WordPenaltyFF(l_models.size(), weight));
          if (logger.isLoggable(Level.FINEST))
            logger.finest(String.format("Process Line: %s\nAdd WordPenalty, weight: %.3f", line, weight));
        } else {
          if (logger.isLoggable(Level.SEVERE)) logger.severe("Wrong config line: " + line);
          System.exit(1);
View Full Code Here

TOP

Related Classes of joshua.decoder.ff.WordPenaltyFF

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.