@Test public void getUnfilteredParsings(){ CostModelStrategy target = new CostModelStrategy(tokens, parameterSet); HashMap<Integer, Double> expectedParsingScores = getExpectedParsingScores(); TreeSet<Parsing> actual = target.getUnfilteredParsings(); for(Iterator<Parsing> iter = actual.iterator(); iter.hasNext();) { Parsing actualParsing = iter.next(); Double expectedScore = expectedParsingScores.get(actualParsing.getIndex()); Assert.assertEquals(expectedScore, actualParsing.getScore(), 1e-4); } }
@Override public TreeSet<Parsing> getUnfilteredParsings() { TreeSet<Parsing> scoredParsings = new TreeSet<Parsing>(); if(tokens != null && tokens.length > 0) { generateParsings(); for (Parsing parsing : generatedParsings) { scoreParsing(parsing); scoredParsings.add(parsing); } } return scoredParsings; }
CostModelStrategy extends ParseStrategyBase { @Override public TreeSet<Parsing> getUnfilteredParsings() { TreeSet<Parsing> scoredParsings = new TreeSet<Parsing>(); if(tokens != null && tokens.length > 0) { generateParsings(); for (Parsing parsing : generatedParsings) { scoreParsing(parsing); scoredParsings.add(parsing); } } return scoredParsings; } }
CostModelStrategy extends ParseStrategyBase { @Override public TreeSet<Parsing> getUnfilteredParsings() { TreeSet<Parsing> scoredParsings = new TreeSet<Parsing>(); if(tokens != null && tokens.length > 0) { generateParsings(); for (Parsing parsing : generatedParsings) { scoreParsing(parsing); scoredParsings.add(parsing); } } return scoredParsings; } CostModelStrategy(TokenizedString tokens,
                             ParseParameterSet parameterSet); }
CostModelStrategy extends ParseStrategyBase { @Override public TreeSet<Parsing> getUnfilteredParsings() { TreeSet<Parsing> scoredParsings = new TreeSet<Parsing>(); if(tokens != null && tokens.length > 0) { generateParsings(); for (Parsing parsing : generatedParsings) { scoreParsing(parsing); scoredParsings.add(parsing); } } return scoredParsings; } CostModelStrategy(TokenizedString tokens,
                             ParseParameterSet parameterSet); void getDefaultLengthScorings(SolrParams invariants); @Override List<TreeMap<String,Object>> getOutput(); @Override TreeSet<Parsing> getUnfilteredParsings(); }
CostModelStrategy extends ParseStrategyBase { @Override public TreeSet<Parsing> getUnfilteredParsings() { TreeSet<Parsing> scoredParsings = new TreeSet<Parsing>(); if(tokens != null && tokens.length > 0) { generateParsings(); for (Parsing parsing : generatedParsings) { scoreParsing(parsing); scoredParsings.add(parsing); } } return scoredParsings; } CostModelStrategy(TokenizedString tokens,
                             ParseParameterSet parameterSet); void getDefaultLengthScorings(SolrParams invariants); @Override List<TreeMap<String,Object>> getOutput(); @Override TreeSet<Parsing> getUnfilteredParsings();  }