extract_terms: Extract potential keywords from abstracts and titles

Description Usage Arguments Value Examples

View source: R/term_selection.R

Description

Extracts potential keyword terms from text (e.g. titles and abstracts)

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
extract_terms(
  text = NULL,
  keywords = NULL,
  method = c("fakerake", "tagged"),
  min_freq = 2,
  ngrams = TRUE,
  min_n = 2,
  max_n = 5,
  stopwords = NULL,
  language = "English"
)

Arguments

text

A character object of text from which to extract terms

keywords

A character vector of keywords tagged by authors and/or databases if using method="tagged"

method

The method of extracting keywords; options are fakerake (a quick implementation similar to Rapid Automatic Keyword Extraction), or tagged for author-tagged keywords

min_freq

Numeric: the minimum occurrences of a potential term

ngrams

Logical: should litsearchr only extracts phrases with word count greater than a specified n?

min_n

Numeric: the minimum length ngram to consider

max_n

Numeric: the maximum length ngram to consider

stopwords

A character vector of stopwords.

language

A string indicating the language of input data to use for stopwords if none are supplied.

Value

Returns a character vector of potential keyword terms.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
extract_terms(
  text = c(
    "Cross-scale occupancy dynamics of a postfire specialist
    in response to variation across a fire regime",
    "Variation in home-range size of Black-backed Woodpeckers",
    "Black-backed woodpecker occupancy in burned and beetle-killed forests"
  ),
  method = "fakerake",
  min_freq=1,
  min_n=2
)

elizagrames/litsearchr documentation built on April 14, 2021, 3:42 p.m.