From 73d1978babc864dc2f11c5e1f57577dd59c59f53 Mon Sep 17 00:00:00 2001 From: mh-northlander Date: Thu, 28 Nov 2024 13:34:42 +0900 Subject: [PATCH] explain "hidden entry" --- src/main/java/com/worksap/nlp/sudachi/Dictionary.java | 9 +++++---- .../com/worksap/nlp/sudachi/JapaneseDictionaryTest.kt | 2 +- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/src/main/java/com/worksap/nlp/sudachi/Dictionary.java b/src/main/java/com/worksap/nlp/sudachi/Dictionary.java index 741d4e16..ac32a59a 100644 --- a/src/main/java/com/worksap/nlp/sudachi/Dictionary.java +++ b/src/main/java/com/worksap/nlp/sudachi/Dictionary.java @@ -60,11 +60,12 @@ public interface Dictionary extends AutoCloseable { /** * Create a parallel stream of all words in the dictionary as morphemes. * - * Corresponds to the lines in the lexicon csv, i.e. includes hidden entries and - * excludes entries for normalization form. Entries in the stream are not - * sorted. + * Corresponds to the lines in the lexicon csv, i.e. it includes entries that + * appear only when refered from other words (e.g. as constitution) during an + * analysis and excludes entries that automatically added to store a + * normalization form of another word. Entries in the stream are not sorted. * - * @return a stream of morphemes. + * @return a parallel stream of morphemes. */ public Stream entries(); diff --git a/src/test/java/com/worksap/nlp/sudachi/JapaneseDictionaryTest.kt b/src/test/java/com/worksap/nlp/sudachi/JapaneseDictionaryTest.kt index 2cd46b99..93327de1 100644 --- a/src/test/java/com/worksap/nlp/sudachi/JapaneseDictionaryTest.kt +++ b/src/test/java/com/worksap/nlp/sudachi/JapaneseDictionaryTest.kt @@ -142,7 +142,7 @@ class JapaneseDictionaryTest { assertEquals(1, sudachi.size) assertEquals("徳島県産", sudachi[0].getUserData()) - // cannot find hidden entry + // cannot find entry with -1 conjunction cost val hidden = dict.lookup("隠し") assertTrue(hidden.isEmpty())