Package joshua.corpus

Examples of joshua.corpus.ParallelCorpus


  }
 
    public void execute() throws IOException, ClassNotFoundException {
     
        System.out.println("Getting parallel corpus");
      ParallelCorpus parallelCorpus = getParallelCorpus(joshDir, cacheSize);
   
      System.out.println("Getting lexprobs");
      LexicalProbabilities lexProbs =
      new LexProbs(parallelCorpus, Float.MIN_VALUE);
   
View Full Code Here


      Scanner sourceGivenTarget = new Scanner(sourceGivenTargetCounts);
      Scanner targetGivenSource = new Scanner(targetGivenSourceCounts);
      */
//      String alignmentString = "0-0 1-1 2-2 3-3 4-4 5-5 6-6 7-7 8-8 9-9 10-10 11-11 12-12 13-13 14-14 15-15 16-16 17-17";
   
      ParallelCorpus parallelCorpus =
        new AlignedParallelCorpus(suffixArray.getCorpus(), targetSuffixArray.getCorpus(), alignments);
//      {
//        public Alignments getAlignments() { return alignments; }
//        public int getNumSentences() { return suffixArray.getCorpus().getNumSentences(); }
//        public Corpus getSourceCorpus() { return suffixArray.getCorpus(); }
View Full Code Here

        out.println("Source-target alignment grids: " + binaryAlignmentsFilename);
      }

      // Write lexprobs to disk
      {
        ParallelCorpus parallelCorpus = new AlignedParallelCorpus(sourceCorpusArray, targetCorpusArray, grids);

        if (logger.isLoggable(Level.INFO)) logger.info("Constructing lexprob table");
        LexicalProbabilities lexProbs =
          new LexProbs(parallelCorpus, Float.MIN_VALUE);
View Full Code Here

TOP

Related Classes of joshua.corpus.ParallelCorpus

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.