pub struct NoriAnalyzer { /* private fields */ }Expand description
Nori 분석기
Lucene Nori의 KoreanAnalyzer와 호환되는 인터페이스
Implementations§
Source§impl NoriAnalyzer
impl NoriAnalyzer
Sourcepub fn new(
user_dictionary: Option<String>,
decompound_mode: DecompoundMode,
stoptags: Vec<String>,
output_unknown_unigrams: bool,
) -> Result<Self>
pub fn new( user_dictionary: Option<String>, decompound_mode: DecompoundMode, stoptags: Vec<String>, output_unknown_unigrams: bool, ) -> Result<Self>
새 Nori 분석기 생성
§Arguments
user_dictionary- 사용자 사전 경로 (옵션)decompound_mode- 복합명사 분해 모드stoptags- 필터링할 품사 태그 (예: [“J”, “E”])output_unknown_unigrams- 미등록어 유니그램 출력 여부
§Example
use mecab_ko_core::nori_compat::{NoriAnalyzer, DecompoundMode};
let stoptags = vec!["J".to_string(), "E".to_string()];
let analyzer = NoriAnalyzer::new(
None,
DecompoundMode::Mixed,
stoptags,
false
).unwrap();§Errors
Returns an error if the tokenizer initialization fails.
Sourcepub fn default_with_decompound(decompound_mode: DecompoundMode) -> Result<Self>
pub fn default_with_decompound(decompound_mode: DecompoundMode) -> Result<Self>
Sourcepub fn add_stoptag(&mut self, tag: String)
pub fn add_stoptag(&mut self, tag: String)
stoptags 추가
Sourcepub fn remove_stoptag(&mut self, tag: &str) -> bool
pub fn remove_stoptag(&mut self, tag: &str) -> bool
stoptags 제거
stoptags 목록 반환
Auto Trait Implementations§
impl !Freeze for NoriAnalyzer
impl !RefUnwindSafe for NoriAnalyzer
impl Send for NoriAnalyzer
impl !Sync for NoriAnalyzer
impl Unpin for NoriAnalyzer
impl UnsafeUnpin for NoriAnalyzer
impl !UnwindSafe for NoriAnalyzer
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more