17个版本 (9个破坏性版本)
新版本 0.10.0 | 2024年8月14日 |
---|---|
0.9.1 | 2024年4月29日 |
0.8.1 | 2024年3月23日 |
0.6.3 | 2023年12月16日 |
0.2.0 | 2023年6月6日 |
#1925 in 文本处理
在 3 个Crates中使用(通过 jpreprocess-njd)
8KB
128 行
jpreprocess-window
jpreprocess的实用库,用于文本到语音应用程序的日语文本预处理程序。
此包实现了可变窗口。
该项目是用Rust语言重写的OpenJTalk。
用法
将以下内容放入Cargo.toml
[dependencies]
jpreprocess-window = "0.10.0"
许可协议
BSD-3-Clause
API参考
lib.rs
:
一个类似迭代器的对象,返回包含五个可变引用的连续窗口。
示例
use jpreprocess_window::*;
let mut vector = [0, 1, 2, 3, 4];
let mut iter = IterQuintMut::new(&mut vector);
assert_eq!(iter.next().unwrap(), Quintuple::First(&mut 0, &mut 1, &mut 2, &mut 3));
assert_eq!(iter.next().unwrap(), Quintuple::Full(&mut 0, &mut 1, &mut 2, &mut 3, &mut 4));
assert_eq!(iter.next().unwrap(), Quintuple::ThreeLeft(&mut 1, &mut 2, &mut 3, &mut 4));
assert_eq!(iter.next().unwrap(), Quintuple::TwoLeft(&mut 2, &mut 3, &mut 4));
assert_eq!(iter.next().unwrap(), Quintuple::Last(&mut 3, &mut 4));