/** * Returns the index of the first NGram entry of the given N-1Gram * * @param nMinus1Gram * the N-1Gram which first NGram entry we're looking for * @param firstNMinus1GramEntry * the index of the first N-1Gram entry of the N-1Gram in * question * @param n * the order of the NGram * @return the index of the first NGram entry of the given N-1Gram */ private int getFirstNGramEntry(NGramProbability nMinus1Gram, int firstNMinus1GramEntry, int n) { int firstNGramEntry = ngramSegmentTable[n - 1][(firstNMinus1GramEntry + nMinus1Gram .getWhichFollower()) >> loader.getLogNGramSegmentSize()] + nMinus1Gram.getFirstNPlus1GramEntry(); return firstNGramEntry; }
/** * Returns the index of the first NGram entry of the given N-1Gram * * @param nMinus1Gram * the N-1Gram which first NGram entry we're looking for * @param firstNMinus1GramEntry * the index of the first N-1Gram entry of the N-1Gram in * question * @param n * the order of the NGram * @return the index of the first NGram entry of the given N-1Gram */ private int getFirstNGramEntry(NGramProbability nMinus1Gram, int firstNMinus1GramEntry, int n) { int firstNGramEntry = ngramSegmentTable[n - 1][(firstNMinus1GramEntry + nMinus1Gram .getWhichFollower()) >> loader.getLogNGramSegmentSize()] + nMinus1Gram.getFirstNPlus1GramEntry(); return firstNGramEntry; }