pub struct SegmentOptions {
pub auto_cjk: bool,
pub all_mod: bool,
pub node_novel_mode: bool,
pub nomod: bool,
pub nodict: bool,
pub options_do_segment: DoSegmentOptions,
pub max_chunk_count: Option<usize>,
pub min_chunk_count: Option<usize>,
pub disable_modules: Vec<String>,
}Expand description
Segmenter construction options.
auto_cjk defaults to false, matching JS new Segment().
Tests and the novel CLI pass autoCjk: true.
Fields§
§auto_cjk: boolExpand CJK variants when adding dictionary words.
all_mod: boolAlso enable ZhtSynonymOptimizer (JS all_mod).
node_novel_mode: boolLoad extra node-novel synonym files.
nomod: boolSkip built-in tokenizers/optimizers.
nodict: boolSkip built-in dictionaries.
options_do_segment: DoSegmentOptionsDefault do_segment options.
max_chunk_count: Option<usize>DictTokenizer max chunk count (JS default 40).
min_chunk_count: Option<usize>DictTokenizer min chunk count (JS default 30).
disable_modules: Vec<String>Module names to disable.
Trait Implementations§
Source§impl Clone for SegmentOptions
impl Clone for SegmentOptions
Source§fn clone(&self) -> SegmentOptions
fn clone(&self) -> SegmentOptions
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SegmentOptions
impl Debug for SegmentOptions
Source§impl Default for SegmentOptions
impl Default for SegmentOptions
Source§fn default() -> SegmentOptions
fn default() -> SegmentOptions
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for SegmentOptions
impl RefUnwindSafe for SegmentOptions
impl Send for SegmentOptions
impl Sync for SegmentOptions
impl Unpin for SegmentOptions
impl UnsafeUnpin for SegmentOptions
impl UnwindSafe for SegmentOptions
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more