/// Register a given message into the `ErrorCorrector`.
Register a given message into the `ErrorCorrector`.
Register a given message into the ` ErrorCorrector ` .
pub fn register(&mut self, message: &str) {
            let ref mut vec = self.0;
            for (index, ch) in message.chars().enumerate() {
                // ensure to have a CharFreq at self.0[index]
                while vec.len() <= index {
                    vec.push(CharFreq::new());
                }
                *vec[index].entry(ch).or_insert(0) += 1;
            }
        }
pub fn register ( & mut self , message : & str ) { let ref mut vec = self . 0 ; for ( index , ch ) in message . chars ( ) . enumerate ( ) { // ensure to have a CharFreq at self.0[index] while vec . len ( ) <= index { vec . push ( CharFreq :: new ( ) ) ; } * vec [ index ] . entry ( ch ) . or_insert ( 0 ) += 1 ; } }
Register a given message into the `ErrorCorrector`.
Register a given message into the ` ErrorCorrector ` .
&mut self
message
&str