Examples of PhraseModelFF


Examples of joshua.decoder.ff.PhraseModelFF

        } else if ("phrasemodel".equals(fds[0]) && fds.length == 4) { // phrasemodel owner column(0-indexed) weight
          int    owner  = this.symbolTable.addTerminal(fds[1]);
          int    column = Integer.parseInt(fds[2].trim());
          double weight = Double.parseDouble(fds[3].trim());
          this.featureFunctions.add(
            new PhraseModelFF(
              this.featureFunctions.size(),
              weight, owner, column));
          if (logger.isLoggable(Level.FINEST))
            logger.finest(String.format(
              "Process Line: %s\nAdd PhraseModel, owner: %s; column: %d; weight: %.3f",
View Full Code Here

Examples of joshua.decoder.ff.PhraseModelFF

            String.format("Line: %s\nAdd Source lattice cost, weight: %.3f", weight));
        } else if (0 == fds[0].compareTo("phrasemodel") && fds.length == 4) { // phrasemodel owner column(0-indexed) weight
          int owner = psymbolTable.addTerminal(fds[1]);
          int column = (new Integer(fds[2].trim())).intValue();
          double weight = (new Double(fds[3].trim())).doubleValue();
          l_models.add(new PhraseModelFF(l_models.size(), weight, owner, column));
          if (logger.isLoggable(Level.FINEST))
            logger.finest(String.format("Process Line: %s\nAdd PhraseModel, owner: %s; column: %d; weight: %.3f", line, owner, column, weight));
        } 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();
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.