private List<ModelScore> scoreWithElimination(String input, int maxSampleCount) {
        int[] samplingPoints;
        if (maxSampleCount == -1)
            samplingPoints = getStepping(input, input.length());
        else
            samplingPoints = getStepping(input, maxSampleCount);
        List<ModelScore> modelScores = Lists.newArrayListWithCapacity(modelIdArray.length);
        for (CharNgramLanguageModel model : models.values()) {
            modelScores.add(new ModelScore(model, 0));
        }
        String[] grams = getGrams(input, samplingPoints);
        int gramCounter = 0;
        int intervalCounter = 0;
        while (gramCounter < grams.length) {
            if (intervalCounter == ELIMINATION_SAMPLE_STEP && modelScores.size() > 2) {
                intervalCounter = 0;
                Collections.sort(modelScores);
                modelScores = modelScores.subList(0, modelScores.size() / 2 + 1);
            }
            for (ModelScore modelScore : modelScores) {
                modelScore.score += modelScore.model.gramProbability(grams[gramCounter]);
            }
            intervalCounter++;
            gramCounter++;
        }
        Collections.sort(modelScores);
        return modelScores;
    }