pub fn match_keywords(&self, text: &str) -> MatchedResult {
        let mut result = MatchedResult::new();
        let mut node = self;

        for (i, c) in text.chars().enumerate() {
            let c = if self.case_insensitive {
                c.to_ascii_lowercase()
            } else {
                c
            };

            while !node.children.contains_key(&c) {
                if node.fail.is_none() {
                    node = self;
                    break;
                }

                node = node.fail.as_ref().unwrap();
            }

            if let Some(child) = node.children.get(&c) {
                node = child;
                for keyword in &node.keywords {
                    let (len, spans) = result
                        .entry(keyword)
                        .or_insert((keyword.chars().count(), Vec::new()));
                    spans.push(i - (*len - 1));
                }
            }
        }

        result
    }
Match keywords in a text.

# Examples
```ignore
let mut dict = Node::new();
dict.add_keywords(&["hello", "world"]);
dict.build();

let result = dict.match_keywords("hello world");
```
autocorrect/src/keyword.rs