Android Studio : Init dic library error :org.ansj.exception.LibraryException
Author: licryleCreated Oct 5, 2024Updated Feb 4, 2025
Hello,
i'm aware this may be an abandoned library but still trying it out... However, my attempt ends up in dictionaries simply not being loaded:
Gradle:
implementation("org.ansj:ansj_seg:5.1.6")
Code:
val result = ToAnalysis.parse(value)
Logs:
Init ambiguity library error :org.ansj.exception.LibraryException: path :library/ambiguity.dic file:/library/ambiguity.dic not found or can not to read, path: library/ambiguity.dic
Init dic library error :org.ansj.exception.LibraryException: path :library/default.dic file:/library/default.dic not found or can not to read, path: library/default.dic
Not too clear whether I was supposed to manually download and configure them somehow.
Source: NLPchina/ansj_seg