View source: R/collocate_comments_fuzzy.R
collocate_comments_fuzzy | R Documentation |
This function provides the frequency of collocations in comments that correspond to the provided transcript, using fuzzy matching.
collocate_comments_fuzzy(
transcript_token,
note_token,
collocate_length = 5,
n_bands = 50,
threshold = 0.7
)
transcript_token |
transcript token to act as baseline for notes, resulting
from |
note_token |
tokenized document of notes, resulting from |
collocate_length |
the length of the collocation. Default is 5 |
n_bands |
number of bands used in MinHash algorithm passed to |
threshold |
considered a match in for Jaccard distance passed to |
data frame of the transcript and corresponding note frequency
comment_example_rename <- dplyr::rename(comment_example[1:10,], page_notes=Notes)
toks_comment <- token_comments(comment_example_rename)
transcript_example_rename <- dplyr::rename(transcript_example, text=Text)
toks_transcript <- token_transcript(transcript_example_rename)
fuzzy_object <- collocate_comments_fuzzy(toks_transcript, toks_comment)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.