natural 0.5.0

Pure rust library for natural language processing.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
extern crate natural;

use natural::ngram::get_ngram;
use natural::ngram::get_ngram_with_padding;

#[test]
fn test_ngram() {
  assert_eq!(get_ngram("hello my darling", 2), vec![vec!["hello", "my"], vec!["my", "darling"]]);
}

#[test]
fn test_ngram_with_pad() {
  assert_eq!(get_ngram_with_padding("my fleas", 2, "boo"), vec![
    vec!["boo", "my"], vec!["my", "fleas"], vec!["fleas", "boo"]]);
}