swift-lda 0.4.0 → 0.4.1
raw patch · 2 files changed
+7/−1 lines, 2 filesPVP ok
version bump matches the API change (PVP)
API changes (from Hackage documentation)
+ NLP.SwiftLDA: docCounts :: Finalized -> Table1D
Files
- NLP/SwiftLDA.hs +6/−0
- swift-lda.cabal +1/−1
NLP/SwiftLDA.hs view
@@ -32,6 +32,7 @@ -- * Querying finalized model , docTopicWeights , wordTopicWeights+ , docCounts ) where -- Standard libraries @@ -102,6 +103,11 @@ , exponent :: !(Maybe Double) -- ^ Learning rate exponent } deriving (Generic) +-- | For each document sum the topic counts +docCounts :: Finalized -> Table1D+docCounts = IntMap.map (sum . IntMap.elems) . docTopics+ + -- | Create transparent immutable object holding model information -- from opaque internal representation finalize :: LDA s -> ST s Finalized
swift-lda.cabal view
@@ -1,5 +1,5 @@ Name: swift-lda-Version: 0.4.0+Version: 0.4.1 Synopsis: Online sampler for Latent Dirichlet Allocation Description: Online Gibbs sampler for Latent Dirichlet Allocation. LDA is a generative admixture model frequently used