Crates.io | lda |
lib.rs | lda |
version | 0.1.0 |
source | src |
created_at | 2020-11-17 03:28:46.615486 |
updated_at | 2020-11-17 03:28:46.615486 |
description | Topic models via Latent Dirichlet Allocation |
homepage | |
repository | |
max_upload_size | |
id | 313159 |
size | 1,919 |
Version 0.1.0 of this library is in development.
Proposed API.
use lda::{Library, StopWords, Lda, LdaArgs, LdaAlgorithm};
let library = Library::from_path("my-docs.txt")
.stop_words(StopWords::English)
.min_word_occurance(10)
.build();
let lda_args = LdaArgs {
alpha: 0.5,
beta: 0.5,
n_topics: 4
};
let mut lda = Lda::new(&library, lda_args);
let mut rng = rand::thread_rng();
lda.fit(1_000, LdaAlgorithm::Gibbs, &mut rng);