Skip to content

Commit

Permalink
Поправил способ выдачи идентификатора словоформы
Browse files Browse the repository at this point in the history
  • Loading branch information
demidko committed Sep 25, 2021
1 parent 80db07b commit 2485b2f
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/main/java/com/github/demidko/aot/WordformMeaning.java
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ private WordformMeaning(int lemmaId, int flexionIndex) {
*/
public long getId() {
BitWriter w = new BitWriter();
w.write(lemmaId, 4);
w.write(flexionIndex, 4);
w.writeInt(lemmaId);
w.writeInt(flexionIndex);
return w.toLong();
}

Expand Down Expand Up @@ -97,10 +97,10 @@ public static List<WordformMeaning> lookupForMeanings(String w) throws IOExcepti
* @param id идентификатор полученный ранее при помощи {@link WordformMeaning#getId()}
* @return словоформа смысла
*/
public static WordformMeaning lookupForMeaningById(long id) throws IOException {
public static WordformMeaning lookupForMeaning(long id) throws IOException {
BitReader reader = new BitReader(id);
int lemmaId = reader.readInt();
int flexionIndex = reader.readShort();
int flexionIndex = reader.readInt();
getDictionary();
return new WordformMeaning(lemmaId, flexionIndex);
}
Expand Down

0 comments on commit 2485b2f

Please sign in to comment.