@Test public void testGeneration2() { WordGenerator wordGenerator = new WordGenerator(getMorphotactics("elma")); List<String> morphemes = Lists.newArrayList("Noun", "A3pl", "P1pl"); List<Result> results = wordGenerator.generate( "elma", morphemes ); Assert.assertTrue(results.size() > 0); Assert.assertEquals("elmalarımız", results.get(0).surface); }
public List<Result> generate(String stem, List<String> morphemeIds) { List<Morpheme> morphemes = new ArrayList<>(); for (String morphemeId : morphemeIds) { Morpheme morpheme = TurkishMorphotactics.getMorpheme(morphemeId); morphemes.add(morpheme); } List<StemTransition> candidates = stemTransitions.getPrefixMatches(stem, false); return generate(stem, candidates, morphemes); }
WordGenerator { public List<Result> generate(String stem, List<String> morphemeIds) { List<Morpheme> morphemes = new ArrayList<>(); for (String morphemeId : morphemeIds) { Morpheme morpheme = TurkishMorphotactics.getMorpheme(morphemeId); morphemes.add(morpheme); } List<StemTransition> candidates = stemTransitions.getPrefixMatches(stem, false); return generate(stem, candidates, morphemes); } }
WordGenerator { public List<Result> generate(String stem, List<String> morphemeIds) { List<Morpheme> morphemes = new ArrayList<>(); for (String morphemeId : morphemeIds) { Morpheme morpheme = TurkishMorphotactics.getMorpheme(morphemeId); morphemes.add(morpheme); } List<StemTransition> candidates = stemTransitions.getPrefixMatches(stem, false); return generate(stem, candidates, morphemes); } WordGenerator(TurkishMorphotactics morphotactics); }
WordGenerator { public List<Result> generate(String stem, List<String> morphemeIds) { List<Morpheme> morphemes = new ArrayList<>(); for (String morphemeId : morphemeIds) { Morpheme morpheme = TurkishMorphotactics.getMorpheme(morphemeId); morphemes.add(morpheme); } List<StemTransition> candidates = stemTransitions.getPrefixMatches(stem, false); return generate(stem, candidates, morphemes); } WordGenerator(TurkishMorphotactics morphotactics); static WordGenerator forDebug(TurkishMorphotactics morphotactics); AnalysisDebugData getDebugData(); List<Result> generate(String stem, List<String> morphemeIds); List<Result> generate(DictionaryItem item, List<Morpheme> morphemes); List<Result> generate(DictionaryItem item, Morpheme... morphemes); List<Result> generate(DictionaryItem item, String... morphemeIds); }
WordGenerator { public List<Result> generate(String stem, List<String> morphemeIds) { List<Morpheme> morphemes = new ArrayList<>(); for (String morphemeId : morphemeIds) { Morpheme morpheme = TurkishMorphotactics.getMorpheme(morphemeId); morphemes.add(morpheme); } List<StemTransition> candidates = stemTransitions.getPrefixMatches(stem, false); return generate(stem, candidates, morphemes); } WordGenerator(TurkishMorphotactics morphotactics); static WordGenerator forDebug(TurkishMorphotactics morphotactics); AnalysisDebugData getDebugData(); List<Result> generate(String stem, List<String> morphemeIds); List<Result> generate(DictionaryItem item, List<Morpheme> morphemes); List<Result> generate(DictionaryItem item, Morpheme... morphemes); List<Result> generate(DictionaryItem item, String... morphemeIds);  }