![]() |
VOOZH | about |
dotnet add package Chonkie.Net --version 0.1.0-preview.87
NuGet\Install-Package Chonkie.Net -Version 0.1.0-preview.87
<PackageReference Include="Chonkie.Net" Version="0.1.0-preview.87" />
<PackageVersion Include="Chonkie.Net" Version="0.1.0-preview.87" />Directory.Packages.props
<PackageReference Include="Chonkie.Net" />Project file
paket add Chonkie.Net --version 0.1.0-preview.87
#r "nuget: Chonkie.Net, 0.1.0-preview.87"
#:package Chonkie.Net@0.1.0-preview.87
#addin nuget:?package=Chonkie.Net&version=0.1.0-preview.87&prereleaseInstall as a Cake Addin
#tool nuget:?package=Chonkie.Net&version=0.1.0-preview.87&prereleaseInstall as a Cake Tool
Chonkie.Net is an experimental .NET/C# port of Python Chonkie, providing fast, efficient, and robust text chunking for Retrieval-Augmented Generation (RAG) systems. This is an independent port and is not officially affiliated with the original Chonkie project.
dotnet add package Chonkie.Net
using Chonkie.Chunkers;
using Chonkie.Tokenizers;
// Create a chunker
var chunker = new RecursiveChunker(
tokenizer: new WordTokenizer(),
chunkSize: 512
);
// Chunk your text
var text = "Your document here...";
var chunks = chunker.Chunk(text);
// Use the chunks
foreach (var chunk in chunks)
{
Console.WriteLine($"Text: {chunk.Text}");
Console.WriteLine($"Tokens: {chunk.TokenCount}");
}
using Chonkie.Embeddings;
using Chonkie.Handshakes;
// Create embeddings
var embeddings = new OpenAIEmbeddings(
apiKey: Environment.GetEnvironmentVariable("OPENAI_API_KEY")!
);
// Create vector database connection
var vectorDb = new PineconeHandshake(
apiKey: "your-pinecone-key",
indexName: "my-index",
embeddingModel: embeddings
);
// Store chunks with embeddings (vectorDb embeds internally)
await vectorDb.WriteAsync(chunks);
| Chunker | Best For | Speed |
|---|---|---|
| TokenChunker | Simple, fast splitting | ⚡⚡⚡ |
| RecursiveChunker | Natural documents (RECOMMENDED) | ⚡⚡ |
| SentenceChunker | Sentence boundaries | ⚡⚡ |
| SemanticChunker | Meaning-aware grouping | ⚡ |
| CodeChunker | Source code | ⚡⚡ |
| TableChunker | Structured data | ⚡⚡ |
| MarkdownChunker | Markdown documents | ⚡⚡ |
| LateChunker | Two-stage processing | ⚡ |
| NeuralChunker | ONNX embeddings | ⚡ |
| SlumberChunker | Complex documents | ⚡ |
| FastChunker | High-speed splitting | ⚡⚡⚡ |
// Chunk documents, embed, and store in vector DB
var chunks = chunker.Chunk(document);
await vectorDb.WriteAsync(chunks);
var codeChunker = new CodeChunker(
tokenizer: new WordTokenizer(),
chunkSize: 1024
);
var chunks = codeChunker.Chunk(sourceCode);
var semanticChunker = new SemanticChunker(
tokenizer: new WordTokenizer(),
embeddingModel: embeddings,
threshold: 0.5f
);
var chunks = semanticChunker.Chunk(text);
// Chunks grouped by semantic meaning
var pipeline = new Pipeline()
.ProcessWith("text")
.ChunkWith("recursive", new { chunk_size = 1024 })
.RunAsync(texts: documentText);
✅ Type Safety - Full C# 14 support
✅ Almost Production Ready - 900+ tests, zero warnings
✅ Extensively Documented - Tutorials and guides
✅ Complete Features - Feature parity with Python Chonkie, all major RAG components included
Contributions are welcome! Please visit GitHub Repository.
Licensed under Apache License 2.0. See LICENSE for details.
/docs folder in the repositoryLearn more about Target Frameworks and .NET Standard.
This package is not used by any NuGet packages.
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0-preview.87 | 197 | 2/16/2026 |