Package joshua.decoder.ff

Examples of joshua.decoder.ff.ArityPhrasePenaltyFF


          int owner      = this.symbolTable.addTerminal(fds[1]);
          int startArity = Integer.parseInt(fds[2].trim());
          int endArity   = Integer.parseInt(fds[3].trim());
          double weight  = Double.parseDouble(fds[4].trim());
          this.featureFunctions.add(
            new ArityPhrasePenaltyFF(
              this.featureFunctions.size(),
              weight, owner, startArity, endArity));
         
          if (logger.isLoggable(Level.INFO))
            logger.finest(String.format(
View Full Code Here


        } else if (0 == fds[0].compareTo("arityphrasepenalty") && fds.length == 5){//arityphrasepenalty owner start_arity end_arity weight
          int owner = psymbolTable.addTerminal(fds[1]);
          int start_arity = (new Integer(fds[2].trim())).intValue();
          int end_arity = (new Integer(fds[3].trim())).intValue();
          double weight = (new Double(fds[4].trim())).doubleValue();
          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));
View Full Code Here

TOP

Related Classes of joshua.decoder.ff.ArityPhrasePenaltyFF

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.