pub struct KeywordsConfig {
pub version: u32,
pub patterns: HashMap<String, Vec<String>>,
pub stop_words: StopWordsConfig,
pub semantic_aliases: Vec<[String; 2]>,
pub contradiction_signals: Vec<String>,
pub tech_keywords: Vec<String>,
}Expand description
Keywords configuration for memory detection.
Fields§
§version: u32Configuration version.
patterns: HashMap<String, Vec<String>>Category detection patterns.
stop_words: StopWordsConfigStop words for keyword filtering.
semantic_aliases: Vec<[String; 2]>Semantic alias mappings.
contradiction_signals: Vec<String>Contradiction/change signal words.
tech_keywords: Vec<String>Technical keywords for extraction.
Implementations§
Source§impl KeywordsConfig
impl KeywordsConfig
Sourcepub fn get_patterns(&self, category: MemoryCategory) -> &[String]
pub fn get_patterns(&self, category: MemoryCategory) -> &[String]
Get patterns for a specific category.
Sourcepub fn get_stop_words_set(&self) -> HashSet<&str>
pub fn get_stop_words_set(&self) -> HashSet<&str>
Get all stop words as a set.
Sourcepub fn get_tech_keywords_set(&self) -> HashSet<&str>
pub fn get_tech_keywords_set(&self) -> HashSet<&str>
Get tech keywords as a set.
Sourcepub fn get_aliases(&self) -> Vec<(&str, &str)>
pub fn get_aliases(&self) -> Vec<(&str, &str)>
Get semantic aliases as tuples.
Sourcepub fn save_default_to_user_dir() -> Result<PathBuf>
pub fn save_default_to_user_dir() -> Result<PathBuf>
Save default config to user directory (for customization).
Sourcepub fn add_keywords(&mut self, new_keywords: &[String]) -> bool
pub fn add_keywords(&mut self, new_keywords: &[String]) -> bool
Add new tech keywords (from AI extraction). Returns true if any new keywords were added.
Sourcepub fn add_alias(&mut self, alias: &str, target: &str) -> bool
pub fn add_alias(&mut self, alias: &str, target: &str) -> bool
Add new semantic alias (from AI extraction). Returns true if the alias was added.
Sourcepub fn add_pattern(&mut self, category: &str, pattern: &str) -> bool
pub fn add_pattern(&mut self, category: &str, pattern: &str) -> bool
Add new pattern for a category (from AI extraction). Returns true if the pattern was added.
Trait Implementations§
Source§impl Clone for KeywordsConfig
impl Clone for KeywordsConfig
Source§fn clone(&self) -> KeywordsConfig
fn clone(&self) -> KeywordsConfig
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 KeywordsConfig
impl Debug for KeywordsConfig
Source§impl Default for KeywordsConfig
impl Default for KeywordsConfig
Source§impl<'de> Deserialize<'de> for KeywordsConfig
impl<'de> Deserialize<'de> for KeywordsConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for KeywordsConfig
impl RefUnwindSafe for KeywordsConfig
impl Send for KeywordsConfig
impl Sync for KeywordsConfig
impl Unpin for KeywordsConfig
impl UnsafeUnpin for KeywordsConfig
impl UnwindSafe for KeywordsConfig
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