| --- |
| dataset_info: |
| features: |
| - name: id |
| dtype: string |
| - name: text |
| dtype: string |
| - name: entities |
| struct: |
| - name: start |
| list: int32 |
| - name: end |
| list: int32 |
| - name: label |
| list: string |
| splits: |
| - name: train |
| num_bytes: 433090 |
| num_examples: 457 |
| download_size: 285220 |
| dataset_size: 433090 |
| configs: |
| - config_name: default |
| data_files: |
| - split: train |
| path: data/train-* |
| license: mit |
| language: |
| - en |
| pretty_name: WallStreetBets NER Dataset |
| size_categories: |
| - n<1K |
| task_categories: |
| - token-classification |
| tags: |
| - ner |
| - named-entity-recognition |
| - wsb |
| - reddit |
| - financial-posts |
| - finance |
| - stocks |
| - wallstreetbets |
| - r/wallstreetbets |
| --- |
| |
| # WallStreetBets NER Dataset |
|
|
| A high-quality, human-annotated Named Entity Recognition (NER) dataset composed of **457 gold-standard samples** extracted from Reddit's `r/wallstreetbets`. This dataset is explicitly curated to train zero-shot and token-classification models (like GLiNER) to parse chaotic retail investor text, financial slang, and complex asset mentions. |
|
|
| --- |
|
|
| ## 📊 Dataset Overview |
|
|
| * **Total Samples:** 457 curated posts and long-form "Due Diligence" (DD) manifestos. |
| * **Target Domain:** Retail finance, options trading, and market commentary. |
| * **Format:** Clean text paired with explicit absolute character offset annotations (`start`, `end`, `label`). |
|
|
| ### Entity Schema |
|
|
| | Label | Description | Examples | |
| | :--- | :--- | :--- | |
| | `ticker` | A market ticker symbol representing a tradable financial asset/option underlying. | `$AAPL`, `TSLA`, `AMD`, `GLD` | |
| | `company` | The corporate body, business entity, brand, employer, or manufacturer. | `Microsoft`, `Melvin Capital`, `NVIDIA` | |
|
|
| --- |
|
|
| ## 🎯 Annotation Guidelines & Boundary Rules |
|
|
| To ensure high precision and eliminate labeling noise, annotations strictly adhere to the following linguistic and data engineering boundaries: |
|
|
| ### 1. The Context Disambiguation Rule (e.g., AMD / Tesla) |
| Entities are classified based on **how they function in the sentence context**, not solely by the keyword itself: |
| * **Labeled as `ticker`:** *"Long on AMD 180c options"* or *"Buying shares of TSLA"* (Functions as a transactional asset/market symbol). |
| * **Labeled as `company`:** *"AMD released their new AI chips"* or *"I want to work at Tesla"* (Functions as a corporate entity, manufacturer, or employer). |
|
|
| ### 2. Strict Currency Exclusions (Noise Mitigation) |
| * **Fiat Currencies:** Monetary values, bills, and account units (e.g., `$2`, `$22`, `$10k`, `USD`, `EUR`) are **hard-excluded** and never annotated. |
| * **Cryptocurrencies:** Digital protocol tokens (e.g., `BTC`, `ETH`, `SOL`) are excluded from this equity-centric release to prevent semantic drift. |
|
|
| ### 3. Commodities Disambiguation |
| * **Generic Commodities:** Words like `"gold"`, `"silver"`, or `"oil"` are treated as common nouns and left unlabelled. |
| * **Commodity Instruments:** Asset-tracking ETFs (e.g., `GLD`, `SLV`) are strictly labeled as `ticker`. |
|
|
| --- |
|
|
| ## 🛠️ Quick Start |
|
|
| You can load this dataset instantly using the Hugging Face `datasets` library: |
|
|
| ```python |
| from datasets import load_dataset |
| |
| # Load the dataset |
| dataset = load_dataset("StephanAkkerman/wallstreetbets-ner") |
| |
| # Preview a sample record |
| sample = dataset["train"][0] |
| print(f"Text:\n{sample['text']}\n") |
| print("Entities Found:") |
| for start, end, label in zip(sample["entities"]["start"], sample["entities"]["end"], sample["entities"]["label"]): |
| entity_text = sample["text"][start:end] |
| print(f" - [{label}] {entity_text} ({start} -> {end})") |
| ``` |
|
|
| ## 🧬 Intended Use & Model Training |
|
|
| This dataset is designed for training small-footprint sequence models and fine-tuning adapters (like LoRA models for GLiNER2). |
|
|
| - Training Note: For long posts over 256 tokens, it is highly recommended to perform overlapping sliding-window chunking (e.g., 150-word chunks with a 40-word overlap) to fit attention windows and optimize VRAM allocation without chopping tokens on boundaries. |