top2vecr: Run the top2vecr model

Description Usage Arguments Value Examples

View source: R/top2vec.R

Description

Runs an R implementation of the top2vec model as described here: https://arxiv.org/abs/2008.09470. The R implementation is very similar to the original Python implementation which can be found here: https://github.com/ddangelov/Top2Vec

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
top2vecr(
  x,
  type = "PV-DBOW",
  dim = 300L,
  iter = 40L,
  hs = TRUE,
  window = 15L,
  negative = 0L,
  sample = 1e-05,
  min_count = 50,
  lr = 0.05,
  threads = 4L,
  n_neighbours = 15L,
  n_components = 5L,
  metric = "cosine",
  minPts = 15L
)

Arguments

x

A 'data.frame' object with columns 'doc_id' and 'text' storing document ids and texts as character vectors

dim

Integer value defining the length of embedding vectors

Value

An object of class ...

Examples

1
topic_words <- top2vecr(x)

michalovadek/top2vecr documentation built on Dec. 21, 2021, 5:59 p.m.