Skip to content
This repository was archived by the owner on Mar 9, 2023. It is now read-only.

Commit 03d9ff8

Browse files
authored
Merge pull request #165 from WorksApplications/feature/kazuma-t/fix-user-pos
Fix a bug causing user-defined POS IDs change
2 parents d4699a3 + 45c727d commit 03d9ff8

File tree

5 files changed

+2122
-2
lines changed

5 files changed

+2122
-2
lines changed

scripts/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ if !(type sudachipy > /dev/null 2>&1); then
1313
fi
1414
sudachipy build -o tests/resources/system.dic -d "the system dictionary for the unit tests" -m tests/resources/dict/matrix.def tests/resources/dict/lex.csv
1515
sudachipy ubuild -o tests/resources/user.dic -s tests/resources/system.dic tests/resources/dict/user.csv
16+
sudachipy ubuild -o tests/resources/large_user.dic -s tests/resources/system.dic tests/resources/dict/large_user.csv
1617

1718
set +e
1819

sudachipy/dictionarylib/wordinfolist.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313
# limitations under the License.
1414

1515
import struct
16-
from functools import lru_cache
1716

1817
from .wordinfo import WordInfo
1918

@@ -25,7 +24,6 @@ def __init__(self, bytes_, offset, word_size, has_synonym_gid):
2524
self._word_size = word_size
2625
self.has_synonym_gid = has_synonym_gid
2726

28-
@lru_cache(2048)
2927
def get_word_info(self, word_id):
3028
orig_pos = self.bytes.tell()
3129
index = self.word_id_to_offset(word_id)

0 commit comments

Comments
 (0)