source dict | beads listlengths 1 2.24k | string_id int64 0 50k |
|---|---|---|
{
"dataset": "wikimedia/wikipedia",
"article_id": "12",
"source_article_hash": "cee7181c84f502383be04e01db5c53acc80c78c905b4c359f0e3e5f6655aa909",
"lang": "en"
} | [
"Anarchism is a political philosophy and movement that is skeptical of all justifications for authority and seeks to abolish the institutions it claims maintain unnecessary coercion and hierarchy, typically including nation - states, and capitalism. Anarchism advocates for the replacement of the state with",
"sta... | 0 |
{
"dataset": "wikimedia/wikipedia",
"article_id": "39",
"source_article_hash": "cf2cb99bb0a10bfe91eb13df683a423e4b3ab5202cbd0e5aeabc6fbb36566580",
"lang": "en"
} | [
"Albedo ( ; ) is the fraction of sunlight that is diffusely reflected by a body. It is measured on a scale from 0 ( corresponding to a black body that absorbs all incident radiation ) to 1 ( corresponding to a body that reflects all incident radiation ). Surface albedo is defined as the ratio",
"of radiosity Je t... | 1 |
{
"dataset": "wikimedia/wikipedia",
"article_id": "290",
"source_article_hash": "8e1db4f056c72709b761ab3696d494eede3fad889876ebd96a42fb96056ec2f6",
"lang": "en"
} | [
"A, or a, is the first letter and the first vowel of the Latin alphabet, used in the modern English alphabet, the alphabets of other western European languages and others worldwide. Its name in English is a ( pronounced ), plural aes. It is similar in shape to the Ancient Greek letter Alpha,",
"from which it deri... | 2 |
{
"dataset": "wikimedia/wikipedia",
"article_id": "303",
"source_article_hash": "75e3893f839f13521b911ee1ef4e2910e70b0a35e8c5e93ebbaeeba1612b6ea7",
"lang": "en"
} | [
"Alabama ( ) is a state in the Southeastern region of the United States, bordered by Tennessee to the north ; Georgia to the east ; Florida and the Gulf of Mexico to the south ; and Mississippi to the west. Alabama is the 30th largest by area and the 24th - most populous of the U.",
"S. states. Alabama is nicknam... | 3 |
{"dataset":"wikimedia/wikipedia","article_id":"305","source_article_hash":"6e09fad63445eb95ccd01f861(...TRUNCATED) | ["In Greek mythology, Achilles ( ) or Achilleus ( ) was a hero of the Trojan War who was known as be(...TRUNCATED) | 4 |
{"dataset":"wikimedia/wikipedia","article_id":"307","source_article_hash":"4d99eeb437704e99639d608af(...TRUNCATED) | ["Abraham Lincoln ( ; February 12, 1809 April 15, 1865 ) was an American lawyer, politician, and sta(...TRUNCATED) | 5 |
{"dataset":"wikimedia/wikipedia","article_id":"308","source_article_hash":"c4da7a8a341ad6562a96a2c98(...TRUNCATED) | ["Aristotle ( ; Aristotélēs, ; 384 322 BC ) was an Ancient Greek philosopher and polymath. His wri(...TRUNCATED) | 6 |
{"dataset":"wikimedia/wikipedia","article_id":"309","source_article_hash":"e2b17a1c2b00ba5ae317546f8(...TRUNCATED) | ["An American in Paris is a jazz - influenced symphonic poem ( or tone poem ) for orchestra by Ameri(...TRUNCATED) | 7 |
{"dataset":"wikimedia/wikipedia","article_id":"316","source_article_hash":"639fc62872558919f3e525c0e(...TRUNCATED) | ["The Academy Award for Best Production Design recognizes achievement for art direction in film. The(...TRUNCATED) | 8 |
{"dataset":"wikimedia/wikipedia","article_id":"324","source_article_hash":"914f777d80234352f0918f930(...TRUNCATED) | ["The Academy Awards, mainly known as the Oscars, are awards for artistic and technical merit for th(...TRUNCATED) | 9 |
Finesse Benchmark Database
Overview
finesse-benchmark-database is a data generation factory for atomic probes in the Finesse benchmark. It generates probes_atomic.jsonl files from Wikimedia Wikipedia datasets, leveraging Hugging Face's datasets library, tokenizers from transformers, and optional PyTorch support.
This tool is designed to create high-quality, language-specific probe datasets for benchmarking fine-grained understanding in NLP tasks.
Installation
Install the package from PyPI:
pip install finesse-benchmark-database
Ensure you have Python 3.10+ installed.
Usage
Here's a complete example of how to configure and generate a dataset:
from finesse_benchmark_database.config import ProbeConfig
from finesse_benchmark_database.main import generate_dataset
# Define the configuration
my_config = ProbeConfig(
languages=['en', 'ko'], # Languages to generate probes for
samples_per_language=10, # Number of samples per language (reduce for testing)
output_file='my_first_probes.jsonl', # Output file path
seed=123 # Random seed for reproducibility
)
# Generate the dataset
print(f"Generating '{my_config.output_file}'...")
generate_dataset(my_config)
print("Dataset generation completed!")
Configuration Options
languages: List of language codes (e.g., ['en', 'ko', 'fr']).samples_per_language: Number of probe samples to generate per language.output_file: Path to the output JSONL file.seed: Optional seed for deterministic results.
Output Format
The output file (probes_atomic.jsonl) is a JSON Lines file where each line is a JSON object representing a probe sample. The structure is as follows:
- source: An object containing metadata about the origin of the probe.
dataset: The source dataset, e.g., "wikimedia/wikipedia".article_id: The unique identifier of the article, e.g., "5438".lang: The language code, e.g., "en".
- beads: An array of strings, where each string is a chunk ("bead") of the article text, processed into atomic units for probing.
Example:
{
"source": {
"dataset": "wikimedia/wikipedia",
"article_id": "5438",
"source_article_hash": "...article_hash...",
"lang": "en"
},
"beads": [
"Capricorn ( pl. capricorns )...",
// more chunks
]
}
Requirements
datasetstransformerstorch(for tokenization)
License
This project is licensed under the Apache-2.0 license.
Contributing
Contributions are welcome! Please open issues or pull requests on the GitHub repository.
- Downloads last month
- 333