Datasets:

Modalities:
Text
Formats:
parquet
License:
Dataset Viewer
Auto-converted to Parquet Duplicate
id
int64
0
999
text
stringlengths
14.7k
98.1k
lang
stringclasses
10 values
path
stringlengths
5
158
repository_name
stringlengths
8
76
0
// Copyright 2021 Google LLC. // Use of this source code is governed by a BSD-style // license that can be found in the LICENSE file. // Code generated file. DO NOT EDIT. // Package webrisk provides access to the Web Risk API. // // For product documentation, see: https://cloud.google.com/web-risk/ // // Creating a c...
go
webrisk/v1/webrisk-gen.go
nimbix/google-api-go-client
1
"<?xml version=\"1.0\" ?><!DOCTYPE TS><TS language=\"ca\" version=\"2.0\">\n<defaultcodec>UTF-8</def(...TRUNCATED)
typescript
src/qt/locale/bitcoin_ca.ts
elifes/coin
2
"<?xml version=\"1.0\" ?><!DOCTYPE TS><TS language=\"bs\" version=\"2.0\">\n<defaultcodec>UTF-8</def(...TRUNCATED)
typescript
src/qt/locale/bitcoin_bs.ts
2pay/MeCoin
3
"<?php\n\n/*\n * This file is part of the Sonata package.\n *\n * (c) Thomas Rabaix <thomas.rabaix@s(...TRUNCATED)
php
src/Sonata/Bundle/DemoBundle/DataFixtures/ORM/LoadProductData.php
igormukhingmailcom-forks/sandbox
4
"\n/* System module */\n\n/*\nVarious bits of information used by the interpreter are collected in\n(...TRUNCATED)
c
contrib/tools/python3/src/Python/sysmodule.c
AnnaAraslanova/catboost
5
"// This file is by code gen, do not modify\n\nimpl<'a, T0: Clone, T1: Clone> TupleCloned for (&'a T(...TRUNCATED)
rust
tuples/src/gen/cloned.rs
BatchOperator/tuples
6
"// Code generated by software.amazon.smithy.rust.codegen.smithy-rs. DO NOT EDIT.\n/// Error type fo(...TRUNCATED)
rust
sdk/backupgateway/src/error.rs
StevenBlack/aws-sdk-rust
7
"use std::fmt::{self, Write};\nuse std::mem::MaybeUninit;\n\n#[cfg(all(feature = \"server\", feature(...TRUNCATED)
rust
src/proto/h1/role.rs
MarinPostma/hyper
8
"###########################################################\n#\n# Copyright (c) 2005, Southpaw Tech(...TRUNCATED)
python
src/tactic/ui/container/tab_wdg.py
CeltonMcGrath/TACTIC
9
"# frozen_string_literal: true\n\n# WARNING ABOUT GENERATED CODE\n#\n# This file is generated. See t(...TRUNCATED)
ruby
gems/aws-sdk-cloudsearch/lib/aws-sdk-cloudsearch/client.rb
AllanFly120/aws-sdk-ruby
End of preview. Expand in Data Studio

💻 Cocha: Code Chunking Assessment

Multilingual Code Files for Evaluating Chunking Algorithms

Cocha is a dataset of source code files from popular GitHub repositories across multiple programming languages, designed to evaluate how well chunking algorithms handle code with its unique structure and syntax.

Key Challenges

This dataset tests chunking algorithms on:

  • Code syntax and indentation
  • Function and class boundaries
  • Import statements and dependencies
  • Comments and docstrings
  • Multiple programming languages
  • Nested structures (loops, conditionals, classes)

Dataset Structure

Corpus Config

Field Description
id Unique identifier
text Full source code content
lang Programming language
path File path in repository
repository_name Source repository

Questions Config

Field Description
doc_id Reference to corpus document
path File path
lang Programming language
repository_name Source repository
question Question about the code
answer Answer to the question
chunk-must-contain Code passage that must be in the retrieved chunk

Usage

from datasets import load_dataset

# Load corpus
corpus = load_dataset("chonkie-ai/cocha", "corpus", split="train")

# Load questions
questions = load_dataset("chonkie-ai/cocha", "questions", split="train")

Part of MTCB

Cocha is part of the Massive Text Chunking Benchmark (MTCB), a comprehensive benchmark for evaluating RAG chunking strategies.

License

CC-BY-4.0

Downloads last month
6

Collection including chonkie-ai/cocha