get_overlap_terms: View overlapping terms for a given pair of documents

View source: R/feature_preparation.r

get_overlap_termsR Documentation

View overlapping terms for a given pair of documents

Description

View overlapping terms for a given pair of documents

Usage

get_overlap_terms(dtm, doc.x, doc.y, dtm.y = dtm)

Arguments

dtm

A quanteda dfm

doc.x

The name of the first document in dtm

doc.y

The name of the second document in dtm (or dtm.y)

dtm.y

Optionally, a second dtm (for when the documents occur in separate dtm's)

Value

A character vector

Examples

get_overlap_terms(rnewsflow_dfm, 
                  quanteda::docnames(rnewsflow_dfm)[1],
                  quanteda::docnames(rnewsflow_dfm)[5])

kasperwelbers/RNewsflow documentation built on April 8, 2024, 4:39 p.m.