Skip to content

Commit

Permalink
Добавлен метод getAllFlexions; исправлены ошибки
Browse files Browse the repository at this point in the history
  • Loading branch information
demidko committed Nov 15, 2022
1 parent 8f541df commit c069ea0
Showing 1 changed file with 10 additions and 4 deletions.
14 changes: 10 additions & 4 deletions src/main/java/com/github/demidko/aot/WordformMeaning.java
Original file line number Diff line number Diff line change
Expand Up @@ -55,16 +55,22 @@ public class WordformMeaning {
}
}

/**
* @return всевозможные "сырые" слова, известные библиотеке
*/
public static List<String> getAllFlexions() {
return asList(allFlexionStrings);
}

/**
* Метод обходит словарь библиотеки
*
* @return все возможные словоформы
*/
public List<WordformMeaning> listAllWordforms() {
public static List<WordformMeaning> listAllWordforms() {
List<WordformMeaning> allWordforms = new ArrayList<>();
for (String x : allFlexionStrings) {
List<WordformMeaning> someWordforms = lookupForMeanings(x);
allWordforms.addAll(someWordforms);
for (String flexion : allFlexionStrings) {
allWordforms.addAll(lookupForMeanings(flexion));
}
return allWordforms;
}
Expand Down

0 comments on commit c069ea0

Please sign in to comment.