Combines multiple vocabularies into one
combine_vocabularies(..., combine_stopwords = function(x)
unique(unlist(lapply(x, attr, which = "stopwords"), use.names = FALSE)),
combine_ngram = function(x) attr(x[[1]], "ngram"),
combine_sep_ngram = function(x) attr(x[[1]], "sep_ngram"))
text2vec_vocabulary
see details in create_vocabulary.
vocabulary objects created with create_vocabulary.
function to combine stopwords from input vocabularies. By default we take a union of all stopwords.
function to combine lower and upper boundary for n-grams from input vocabularies. Usually these values should be the same, so we take this parameter from first vocabulary.
function to combine stopwords from input vocabularies. Usually these values should be the same, so we take this parameter from first vocabulary.