mirror of
https://git.pumpin.online/funkpower/catena.git
synced 2026-10-23 03:07:13 +00:00
publish as catena-corpus on PyPI and npm
Both registries already have a `catena`: an HPE blockchain client on PyPI,
and a JavaScript OOP wrapper at 2.2.0 on npm. Neither is going anywhere, so
the distributions take a name that is free on both.
The Python import is unaffected — a distribution name and a module name are
independent there, so `pip install catena-corpus` still gives `import
catena`, and nothing in the examples or the bindings changes. On npm the
package name is the import specifier, so that one does change: `import
{ chunkMarkdown } from "catena-corpus"`.
The crates keep their own names. `catena` is free on crates.io.
This commit is contained in:
@@ -4,11 +4,11 @@ Turn a pile of files into a searchable corpus: chunking, scrubbing, subtitles
|
||||
and rank fusion, as WebAssembly.
|
||||
|
||||
```sh
|
||||
npm install catena
|
||||
npm install catena-corpus
|
||||
```
|
||||
|
||||
```js
|
||||
import { chunkMarkdown, scrub, countTokens, fuseHits } from "catena";
|
||||
import { chunkMarkdown, scrub, countTokens, fuseHits } from "catena-corpus";
|
||||
|
||||
const chunks = chunkMarkdown(markdown, 512, 64);
|
||||
chunks[0].page; // 41
|
||||
@@ -60,7 +60,7 @@ at compile time. Those stay command-line tools.
|
||||
## Node and the web
|
||||
|
||||
```js
|
||||
import { chunkMarkdown } from "catena"; // resolves per environment
|
||||
import { chunkMarkdown } from "catena-corpus"; // resolves per environment
|
||||
import { chunkMarkdown } from "catena/node"; // or pick one
|
||||
import { chunkMarkdown } from "catena/web";
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user