mirror of
https://github.com/patarapolw/cjdic2.git
synced 2026-11-09 17:39:35 +00:00
make starting from zero work on Android + Windows
This commit is contained in:
1 parent
653eacf8d4
commit
a00efbf505
10 files changed
+166
-44
No files matched your search
@@ -26,9 +26,8 @@ pub struct Tokenizer {
|
||||
}
|
||||
|
||||
impl Tokenizer {
|
||||
pub fn new(vibrato_dict: impl AsRef<Path>) -> Result<Self, CJDicError> {
|
||||
let file = BufReader::new(File::open(vibrato_dict)?);
|
||||
let reader = zstd::Decoder::new(file)?;
|
||||
pub fn new(vibrato_dic: impl AsRef<Path>) -> Result<Self, CJDicError> {
|
||||
let reader = BufReader::new(File::open(vibrato_dic)?);
|
||||
let dictionary = vibrato_rkyv::Dictionary::read(reader)?;
|
||||
Ok(Self {
|
||||
ja_tokenizer: vibrato_rkyv::Tokenizer::new(dictionary),
|
||||
|
||||
Reference in new issue
Block a user