From d69315b39366adf53c48154725f2128416eb2d21 Mon Sep 17 00:00:00 2001 From: Hossein Pourbozorg Date: Fri, 6 Sep 2024 19:37:43 +0330 Subject: [PATCH] Use `enabled=showprogress` (#284) * Use `enabled=showprogress` --- Project.toml | 2 +- src/lda.jl | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/Project.toml b/Project.toml index a930550..f7760af 100644 --- a/Project.toml +++ b/Project.toml @@ -2,7 +2,7 @@ name = "TextAnalysis" uuid = "a2db99b7-8b79-58f8-94bf-bbc811eef33d" license = "MIT" desc = "Julia package for text analysis" -version = "0.8.1" +version = "0.8.2" [deps] DataStructures = "864edb3b-99cc-5e75-8d2d-829cb0a9cfe8" diff --git a/src/lda.jl b/src/lda.jl index 2497b9c..ab07398 100644 --- a/src/lda.jl +++ b/src/lda.jl @@ -68,10 +68,8 @@ function lda( probs = Vector{Float64}(undef, ntopics) - wait_time = showprogress ? 1.0 : Inf - # Gibbs sampling - @showprogress dt = wait_time for _ in 1:iteration + @showprogress enabled = showprogress for _ in 1:iteration for doc in docs for (i, word) in enumerate(doc.text) topicid_current = doc.topic[i]