/// Construct a graph from a list of sentences
Construct a graph from a list of sentences
Construct a graph from a list of sentences
fn construct_graph(sentences: Vec<Vec<&str>>) -> (Vec<&str>, Trie<&str>) {
    let mut builder = TrieBuilder::new();
    let mut roots = Vec::new();
    for sentence in sentences.iter() {
        roots.push(sentence[0]);
        builder.push(sentence);
    }
    (roots, builder.build())
}
fn construct_graph ( sentences : Vec < Vec < & str > > ) -> ( Vec < & str > , Trie < & str > ) { let mut builder = TrieBuilder :: new ( ) ; let mut roots = Vec :: new ( ) ; for sentence in sentences . iter ( ) { roots . push ( sentence [ 0 ] ) ; builder . push ( sentence ) ; } ( roots , builder . build ( ) ) }
Construct a graph from a list of sentences
Construct a graph from a list of sentences
sentences
Vec<Vec<&str>>