create_hash_function.Rd
Replace terms with their hashed valued using a hash function that outputs integers from 1 to N.
create_hash_function(cardinality = 100L) hash(text, hash_func) # S3 method for character hash(text, hash_func) # S3 method for document hash(text, hash_func = NULL) # S3 method for documents hash(text, hash_func = NULL) # S3 method for dtm hash(text, hash_func = NULL) # S3 method for corpus hash(text, hash_func = NULL)
cardinality | Max index used for hashing (default 100). |
---|---|
text | A |
hash_func | A hash function as returned by |
# NOT RUN { init_textanalysis() hash_func <- create_hash_function(10L) hash("a", hash_func) doc <- string_document("A simple document.") hash(doc, hash_func) # }