tag_smartly: Tag topics based on known documents

Description Usage Arguments Value

View source: R/tag_smartly.R

Description

Given a set of documents tagged with topics and a set of new documents, tags new documents by learning characteristics of topics from existing tagged documents.

Usage

1
2
3
4
5
6
7
tag_smartly(
  new_documents,
  tagged_documents,
  tags,
  cutoff = NULL,
  prop_training = 0.7
)

Arguments

new_documents

a character vector of documents to tag

tagged_documents

a character vector of documents

tags

a character vector of tags of the same length as tagged_documents

cutoff

numeric: what cutoff should be used for probability of being included in a topic? If NULL, finds the optimal cutoff for model accuracy in training data.

prop_training

numeric: what proportion of tagged_documents should be used for training? Remaining proportion will be used for model testing.

Value

a character vector of tags of length equal to new_documents


elizagrames/topictagger documentation built on Jan. 1, 2021, 12:16 a.m.