mirror of
https://git.pumpin.online/funkpower/catena.git
synced 2026-10-22 18:57:14 +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:
@@ -25,7 +25,7 @@ call the same Rust and hand back the same records.
|
||||
## Python
|
||||
|
||||
```sh
|
||||
pip install catena
|
||||
pip install catena-corpus
|
||||
```
|
||||
|
||||
```python
|
||||
@@ -100,11 +100,11 @@ server, and none of that is cheaper in process.
|
||||
## JavaScript
|
||||
|
||||
```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
|
||||
@@ -125,7 +125,7 @@ Two builds, because the loaders differ — node reads the `.wasm` off disk at
|
||||
import, the web build takes a URL a bundler rewrites:
|
||||
|
||||
```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";
|
||||
```
|
||||
|
||||
@@ -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";
|
||||
```
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
{
|
||||
"name": "catena",
|
||||
"name": "catena-corpus",
|
||||
"version": "@VERSION@",
|
||||
"description": "Turn a pile of files into a searchable corpus: chunking, scrubbing, subtitles and rank fusion, as WebAssembly",
|
||||
"license": "MPL-2.0",
|
||||
|
||||
@@ -3,7 +3,7 @@ requires = ["maturin>=1.9,<2.0"]
|
||||
build-backend = "maturin"
|
||||
|
||||
[project]
|
||||
name = "catena"
|
||||
name = "catena-corpus"
|
||||
description = "The catena libraries behind one surface, for calling in process rather than as a subprocess"
|
||||
readme = "README.md"
|
||||
license = "MPL-2.0"
|
||||
|
||||
Reference in New Issue
Block a user