Plots terms preceding/proceeding a chosen term to give more context around how it is used in conversation.
term_context(df, text_var, term, preceding_n, proceeding_n, top_n)
The variable containing text.
The chosen term in lowercase.
An integer representing the number of terms to precede the chosen term.
An integer representing the number of terms to proceed the chosen term.
The maximum number of ngrams to display, filtered by ngram count.
A graph displaying the links between terms, and an ngram frequency table.