read_mallet_statefile: Read a Mallet state file into R

Description Usage Arguments Value

View source: R/mallet_io.R

Description

This function reads a mallet file into R. the purpose is to enable the full strenght of R to visualize and postprocess sampled data from mallet

Usage

1
read_mallet_statefile(state_file, type = "state")

Arguments

state_file

Path to a mallet state file with .gz or .txt suffix.

type

What to return from the state file. Can be state, alpha or beta. Default is state.

Value

The return value depends on type. state returns the topic indicators, word types and document id in tbl_df format. alpha returns a vector of alpha priors values (in character format). beta returns the beta prior (in character format).


MansMeg/PerspectiveTopicModel documentation built on June 30, 2020, 9:20 a.m.