{"id":20425284,"url":"https://github.com/catseye/lexeduct","last_synced_at":"2026-06-08T05:31:43.196Z","repository":{"id":30783351,"uuid":"34340229","full_name":"catseye/Lexeduct","owner":"catseye","description":"MIRROR of https://codeberg.org/catseye/Lexeduct : Experimental framework for text-processing pipelines in JavaScript (in node or browser)","archived":false,"fork":false,"pushed_at":"2023-11-03T16:32:26.000Z","size":42,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-03-05T04:44:57.410Z","etag":null,"topics":["generative-text","live-transformation","pipeline-framework","text-processing","text-transformations"],"latest_commit_sha":null,"homepage":"https://catseye.tc/node/Lexeduct","language":"JavaScript","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/catseye.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-21T16:58:02.000Z","updated_at":"2023-10-25T18:51:35.000Z","dependencies_parsed_at":"2023-01-14T17:40:23.919Z","dependency_job_id":null,"html_url":"https://github.com/catseye/Lexeduct","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"purl":"pkg:github/catseye/Lexeduct","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catseye%2FLexeduct","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catseye%2FLexeduct/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catseye%2FLexeduct/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catseye%2FLexeduct/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/catseye","download_url":"https://codeload.github.com/catseye/Lexeduct/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/catseye%2FLexeduct/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34050225,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-08T02:00:07.615Z","response_time":111,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["generative-text","live-transformation","pipeline-framework","text-processing","text-transformations"],"created_at":"2024-11-15T07:12:46.526Z","updated_at":"2026-06-08T05:31:43.181Z","avatar_url":"https://github.com/catseye.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"Lexeduct\n========\n\n**You can try Lexeduct live in your web browser here: [Lexeduct Online][]**\n\n\u003e \"this is not a wheel I've re-invented before\"\n\n**Lexeduct** is an experimental framework for text-processing pipelines,\nwritten in Javascript, usable both on the console under [Node.js][], and\nin a web browser.\n\nIt is currently a work in progress.  The current released version is 0.1.\nThe framework and usage and everything is subject to change without notice.\n\nBeing a framework, Lexeduct inevitably handles some use cases well, and other\nuse cases poorly.  See the \"Limitations\" section below for more details.\n\nThe name \"Lexeduct\" is in analogy with \"aqueduct\": conduits for words intead\nof water.\n\nBasic Usage\n-----------\n\nThe main tool is `lexeduct.js`.  You can `cd` into the `src` directory and run\nit as `./lexeduct.js`, or you can put the `src` directory on your executable\nsearch path, for example like\n\n    export PATH=$PATH:/path/to/lexeduct/src\n\nand run it as `lexeduct.js` from anywhere on your system.  (YMMV on Windows.)\n\nThe basic usage is\n\n    lexeduct.js {param=value|transformer-name}\n\nSo, for example,\n\n    $ echo 'Hello!' | lexeduct.js upper\n    HELLO\n\nParameters can be given with the syntax `name=value` before the name of the\ntransformer they are to be applied to:\n\n    $ echo 'Hello' | lexeduct.js chars=e remove-chars\n    Hllo\n\nYou can of course use shell pipelines to compose transformers:\n\n    $ echo 'Hello!' | lexeduct.js upper | lexeduct.js chars=' ' insert-chars\n    H E L L O !\n\n*Or* you can name multiple transformers on `lexeduct.js`'s command line to\ncompose them:\n\n    $ echo 'Hello!' | lexeduct.js upper chars=' ' insert-chars\n    H E L L O !\n\nMultiple transformers are applied left-to-right.\n\n    $ echo 'Hello!' | lexeduct.js chars=a insert-chars upper\n    HAEALALAOA!A\n\n    $ echo 'Hello!' | lexeduct.js upper chars=a insert-chars\n    HaEaLaLaOa!a\n\nTransformers\n------------\n\nThe idea is that this repository will eventually contain a giant catalogue\nof possible text transformers that can be composed.  Or at least, more than\nare presently included.\n\nEach transformer is in a seperate Javascript file in the `src/transformers`\ndirectory which exports, node-style, a single function called `makeTransformer`\nwhich takes a configuration object and returns a transformer function.  The\ntransformer function takes two arguments: the current string to process, and\n(optionally) an object which can be used to store ancillary state.  Every\ntransformer function should return either a string, or null (not yet supported),\nor an array of strings (not yet supported.)\n\nThe module may also export a couple of other things, like an English description\nof the transformer, and the possible configuration options.  For a reasonably\nsimple example, see the source of the `upper` transformer, in\n[upper.js](src/transformers/upper.js).\n\nState deposited into the state object is shared by all transformers, so it's\na good idea to choose a key that you think will probably be unique.\n\nIn-Browser Version\n------------------\n\nRun `./make.sh` from this directory (or the commands it contains) to generate\na Javascript file which contains all the available transformers in a format\nsuitable for loading in an HTML document.\n\nThen open `demo/lexeduct.html` in your browser.  It provides a UI for composing\nthese transformers and applying them to text provided in a textarea.\n\nLimitations\n-----------\n\nThe main limitation is that every filter is line-based.  Even the filters\nthat work on words take a line, split it into words, do whatever it is they\ndo to the words, then stick the words back together to form a new line,\ndestroying any irregular spacing in the original line.\n\nAcknowledgements\n----------------\n\nLexeduct was partly inspired by, and is partly a product of parallel evolution\nresembling, [Michael Paulukonis][]'s [TextMunger][].  It is also indebted to\nvarious and sundry discussion with him, and others on the\n[GenerativeText Forum][], particularly [John Ohno][].\n\n[Lexeduct Online]:      https://catseye.tc/installation/Lexeduct\n[Node.js]:              https://nodejs.org/\n[Michael Paulukonis]:   https://michaelpaulukonis.github.io/\n[TextMunger]:           https://github.com/MichaelPaulukonis/text-munger\n[GenerativeText Forum]: https://groups.google.com/forum/#!forum/generativetext\n[John Ohno]:            https://www.lord-enki.net/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatseye%2Flexeduct","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcatseye%2Flexeduct","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcatseye%2Flexeduct/lists"}