Get indexes for each word in sentence

sl_word_ids_sentences(sentences, words)

Arguments

sentences

list of character vectors for each sentence

words

dictionary of words in corpus

Value

list of index vectors for each word in sentence

Examples

my_words <- c("hello","this","is") my_sentences <-list(c("hello","is"),c("this","is")) sl_word_ids_sentences(my_sentences,my_words)
#> [[1]] #> [1] 1 3 #> #> [[2]] #> [1] 2 3 #>