Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/antononcube/wl-dsltranslation-paclet
Wolfram Language (aka Mathematica) paclet for translation of natural language commands into code.
https://github.com/antononcube/wl-dsltranslation-paclet
cli code-generation dsl mathematica raku translation web-api wl
Last synced: 17 days ago
JSON representation
Wolfram Language (aka Mathematica) paclet for translation of natural language commands into code.
- Host: GitHub
- URL: https://github.com/antononcube/wl-dsltranslation-paclet
- Owner: antononcube
- License: mit
- Created: 2023-04-29T18:24:21.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-04-29T20:49:55.000Z (over 1 year ago)
- Last Synced: 2024-11-05T18:55:55.402Z (2 months ago)
- Topics: cli, code-generation, dsl, mathematica, raku, translation, web-api, wl
- Language: Mathematica
- Homepage: https://resources.wolframcloud.com/PacletRepository/resources/AntonAntonov/DSLTranslation/
- Size: 266 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# DSLTranslation WL paclet
Wolfram Language (aka Mathematica) paclet for translation of natural language commands into code.
- Domain Specific Language (DSL) translation can be done via a Web service or an (OS Shell) Command Line Interface (CLI) command.
- By default a Web service is used, with the URL: "http://accendodata.net:5040/translate".
- By default the output is copied to the clipboard. (Code results can be just pasted and executed.)
- There are signatures and options that allow the specification of the from- and to-language used in DSL the translation.This diagram summarizes the notebook-server and notebook-CLI interactions:
```mermaid
graph TD
NB>Notebook]
WL{{WL}}
Raku{{Raku}}
RakuLocal{{Raku}}
WebAPI[[Web API]]
RakuServer["DSL translator
web service"]
RakuCLI["DSL translator CLI"]
NB <--> WebAPI
RakuServer <--> WebAPI
NB <--> RakuCLI
RakuServer -.- Raku
WebAPI -.- WL
RakuCLI -.- RakuLocal
subgraph Local
RakuLocal
WL
RakuCLI
end
subgraph Server
Raku
RakuServer
end
```------
## Usage examples
Generate Wolfram Language (WL) code for Latent Semantic Analysis (LSA) command:
```mathematica
DSLTranslation["use aDocs; create document term matrix; extract 20 topics; show topics table"]
``````
LSAMonUnit[aDocs]⟹LSAMonMakeDocumentTermMatrix[]⟹LSAMonExtractTopics["NumberOfTopics" -> 20]⟹LSAMonEchoTopicsTable[]
```Translate LSA command from English to Python:
```mathematica
DSLTranslation["create document term matrix", "Python"]
``````
".make_document_term_matrix( )"
```Translate classifier creation command from English to Bulgarian:
```mathematica
DSLTranslation["create a random forest classifier", "English" -> "Bulgarian"]
```
```
"тренирай класификатор с метод: random forest"
```