Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Latent Semantic Analysis Monad in R (LSAMon-R)

This package, LSAMon-R, implements a software monad for the specification of Latent Semantic Analysis (LSA) workflows. LSAMon-R's computations are based on the document-term matrix creation functions in the package SparseMatrixRecommender and the packages for matrix factorization irlba and NonNegativeMatrixFactorization.

Here is an example pipeline:

lsaObj <-
  LSAMonUnit( textHamlet ) %>%
  LSAMonMakeDocumentTermMatrix( stemWordsQ = TRUE, stopWords = stopwords::stopwords() ) %>%
  LSAMonApplyTermWeightFunctions( "IDF", "None", "Cosine" ) %>%
  LSAMonExtractTopics( numberOfTopics = numberOfTopics, minNumberOfDocumentsPerTerm = minNumberOfDocumentsPerTerm, maxSteps = maxSteps, method = "NNMF" ) %>%
  LSAMonEchoTopicsTable( numberOfTerms = 20 )

To install use the command:

install.packages("irlba", "magrittr", "purrr")
devtools::install_github("antononcube/R-packages", subdir = "SparseMatrixRecommender")   
devtools::install_github("antononcube/R-packages", subdir = "NonNegativeMatrixFactorization")   
devtools::install_github("antononcube/R-packages", subdir = "LSAMon-R")