### Question:
SingleAnalysis { public List<String> getLemmas() { List<String> lemmas = Lists.newArrayListWithCapacity(2); lemmas.add(item.root); String previousStem = getGroup(0).surfaceForm(); if (!previousStem.equals(item.root)) { if (previousStem.endsWith("ğ")) { previousStem = previousStem.substring(0, previousStem.length() - 1) + "k"; } } if (groupBoundaries.length > 1) { for (int i = 1; i < groupBoundaries.length; i++) { MorphemeGroup ig = getGroup(i); MorphemeData suffixData = ig.morphemes.get(0); String surface = suffixData.surface; String stem = previousStem + surface; if (stem.endsWith("ğ")) { stem = stem.substring(0, stem.length() - 1) + "k"; } if (!lemmas.contains(stem)) { lemmas.add(stem); } previousStem = previousStem + ig.surfaceForm(); } } return lemmas; } SingleAnalysis(
      DictionaryItem item,
      List<MorphemeData> morphemeDataList,
      int[] groupBoundaries); static SingleAnalysis unknown(String input); static SingleAnalysis dummy(String input, DictionaryItem item); String surfaceForm(); boolean containsInformalMorpheme(); String getEnding(); String getStem(); boolean containsMorpheme(Morpheme morpheme); StemAndEnding getStemAndEnding(); DictionaryItem getDictionaryItem(); boolean isUnknown(); boolean isRuntime(); List<MorphemeData> getMorphemeDataList(); List<Morpheme> getMorphemes(); MorphemeGroup getGroup(int groupIndex); MorphemeGroup getLastGroup(); MorphemeGroup[] getGroups(); static SingleAnalysis fromSearchPath(SearchPath searchPath); boolean containsAnyMorpheme(Morpheme... morphemes); List<String> getStems(); List<String> getLemmas(); @Override String toString(); String formatLexical(); String formatMorphemesLexical(); PrimaryPos getPos(); String formatLong(); int groupCount(); @Override boolean equals(Object o); @Override int hashCode();  }### Answer:
@Test public void getLemmasTest() { RuleBasedAnalyzer analyzer = getAnalyzer("kitap"); SingleAnalysis analysis = analyzer.analyze("kitap").get(0); Assert.assertEquals(toList("kitap"), analysis.getLemmas()); analysis = analyzer.analyze("kitaplı").get(0); Assert.assertEquals(toList("kitap", "kitaplı"), analysis.getLemmas()); analysis = analyzer.analyze("kitaplarda").get(0); Assert.assertEquals(toList("kitap"), analysis.getLemmas()); analysis = analyzer.analyze("kitabımmış").get(0); Assert.assertEquals(toList("kitap", "kitabım"), analysis.getLemmas()); analysis = analyzer.analyze("kitapçığa").get(0); Assert.assertEquals(toList("kitap", "kitapçık"), analysis.getLemmas()); analyzer = getAnalyzer("okumak"); analysis = analyzer.analyze("okut").get(0); Assert.assertEquals(toList("oku", "okut"), analysis.getLemmas()); analysis = analyzer.analyze("okuttur").get(0); Assert.assertEquals(toList("oku", "okut", "okuttur"), analysis.getLemmas()); analysis = analyzer.analyze("okutturuluyor").get(0); Assert.assertEquals(toList("oku", "okut", "okuttur", "okutturul"), analysis.getLemmas()); analysis = analyzer.analyze("okutturamıyor").get(0); Assert.assertEquals(toList("oku", "okut", "okuttur"), analysis.getLemmas()); analysis = analyzer.analyze("okutturabiliyor").get(0); Assert.assertEquals(toList("oku", "okut", "okuttur", "okutturabil"), analysis.getLemmas()); }