README-work

Latent Semantic Analysis Workflows

In brief

This Raku (Perl 6) package has grammar classes and action classes for the parsing and interpretation of natural Domain Specific Language (DSL) commands that specify Latent Semantic Analysis (LSA) workflows.

The interpreters (actions) target different programming languages: R, Mathematica, Python, Raku. Also, different natural languages.

The interpreters (actions) target different programming languages: R, Mathematica, Python, Raku. Also, different natural languages.

The generated pipelines are for the software monads "LSAMon-R" and "LSAMon-WL", [AA1, AA2], and the object oriented Python implementation [AAp4].

Installation

Zef ecosystem:

zef install DSL::English::LatentSemanticAnalysisWorkflows

GitHub:

zef install https://github.com/antononcube/Raku-DSL-English-LatentSemanticAnalysisWorkflows.git

Examples

Programming languages

Here is a simple invocation:

use DSL::English::LatentSemanticAnalysisWorkflows;

ToLatentSemanticAnalysisWorkflowCode("extract 12 topics using method NNMF and max steps 12", "R::LSAMon");

Here is a more complicated pipeline specification used to generate the code for recommender systems implemented in different languages:

my $command = q:to/END/;
create from textHamlet;
make document term matrix with stemming FALSE and automatic stop words;
apply LSI functions global weight function IDF, local term weight function TermFrequency, normalizer function Cosine;
extract 12 topics using method NNMF and max steps 12 and 20 min number of documents per term;
show topics table with 12 terms;
show thesaurus table for king, castle, denmark
END

say $_.key, "\n", $_.value, "\n"  for ($_ => ToLatentSemanticAnalysisWorkflowCode($command, $_ ) for <R::LSAMon WL::LSAMon Python::LSAMon>);

Natural languages

say $_.key, "\n", $_.value, "\n"  for ($_ => ToLatentSemanticAnalysisWorkflowCode($command, $_ ) for <Bulgarian English Russian>);

Versions

The original version of this Raku package was developed/hosted at [ AAp1 ].

A dedicated GitHub repository was made in order to make the installation with Raku's zef more direct. (As shown above.)

References

[AAp1] Anton Antonov, Latent Semantic Analysis Workflows Raku Package, (2019), ConversationalAgents at GitHub.

[AAp2] Anton Antonov, Latent Semantic Analysis Monad in R, (2019), R-packages at GitHub.

[AAp3] Anton Antonov, Monadic Latent Semantic Analysis Mathematica package, (2017), MathematicaForPrediction at GitHub.

[AAp4] Anton Antonov, LatentSemanticAnalyzer Python package, (2021), Python-packages at GitHub.

DSL::English::LatentSemanticAnalysisWorkflows v0.8.0

Latent Semantic Analysis workflows building by natural language commands.

Authors

  • Anton Antonov

License

GPL-3.0-or-later

Dependencies

DSL::Shared

Test Dependencies

Provides

  • DSL::English::LatentSemanticAnalysisWorkflows
  • DSL::English::LatentSemanticAnalysisWorkflows::Actions::Bulgarian::Standard
  • DSL::English::LatentSemanticAnalysisWorkflows::Actions::English::Standard
  • DSL::English::LatentSemanticAnalysisWorkflows::Actions::Python::LSAMon
  • DSL::English::LatentSemanticAnalysisWorkflows::Actions::R::LSAMon
  • DSL::English::LatentSemanticAnalysisWorkflows::Actions::Russian::Standard
  • DSL::English::LatentSemanticAnalysisWorkflows::Actions::WL::LSAMon
  • DSL::English::LatentSemanticAnalysisWorkflows::Grammar
  • DSL::English::LatentSemanticAnalysisWorkflows::Grammar::LSIApplyCommand
  • DSL::English::LatentSemanticAnalysisWorkflows::Grammar::LatentSemanticAnalysisPhrases
  • DSL::English::LatentSemanticAnalysisWorkflows::Grammarish

The Camelia image is copyright 2009 by Larry Wall. "Raku" is trademark of the Yet Another Society. All rights reserved.