Package joshua.corpus

Examples of joshua.corpus.AlignedParallelCorpus


    Corpus targetCorpusArray = new MemoryMappedCorpusArray(commonVocab, targetFileName);
 
    String alignmentFileName = joshDir + "/alignment.grids";
    Alignments alignments = new MemoryMappedAlignmentGrids(alignmentFileName, sourceCorpusArray, targetCorpusArray);
 
    return new AlignedParallelCorpus(sourceCorpusArray, targetCorpusArray, alignments);
  }
View Full Code Here


      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(); }
//        public Corpus getTargetCorpus() { return targetCorpusArray; }
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

      SuffixArrayFactory.createSuffixArray(targetCorpusArray, SuffixArray.DEFAULT_CACHE_CAPACITY);

    this.alignmentArray =
      SuffixArrayFactory.createAlignments(alignmentFileName, sourceSuffixArray, targetSuffixArray);

    this.parallelCorpus = new AlignedParallelCorpus(sourceCorpusArray, targetCorpusArray, alignmentArray);
//    {
//      public Alignments getAlignments() { return alignmentArray; }
//      public int getNumSentences() { return sourceCorpusArray.getNumSentences(); }
//      public Corpus getSourceCorpus() { return sourceCorpusArray; }
//      public Corpus getTargetCorpus() { return targetCorpusArray; }
View Full Code Here

TOP

Related Classes of joshua.corpus.AlignedParallelCorpus

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.