atilika / kuromoji

Kuromoji is a self-contained and very easy to use Japanese morphological analyzer designed for search
Apache License 2.0
950 stars 131 forks source link

Handling of userDictionary comments #139

Open tottokug opened 1 year ago

tottokug commented 1 year ago

If a word you want to register in the dictionary contains #, it is treated as a comment and the following Exception occurs when loading the dictionary.

RuntimeException: Unmatched quote in entry:.

I would like to change the UserDictionary::read process so that it does not do this if the word is in a quote. https://github.com/atilika/kuromoji/blob/e18ff911fdea0a93c92ec600dc6e123df363fa52/kuromoji-core/src/main/java/com/atilika/kuromoji/dict/UserDictionary.java#L174