task_categories:text-generation language:en language:zh license:mit size_categories:100K<n<1M format:parquet modality:text library:datasets library:dask library:mlcroissant library:polars region:us business case business case synthetic synthetic data enterprise chineese english multilingual
---
dataset_info:
  features:
  - name: case_study_info
    dtype: string
  - name: stakeholders
    sequence:
    - name: stakeholder
      dtype: string
    - name: motivation
      dtype: string
    - name: extracted
      dtype: string
  - name: case_study_solutions
    dtype: string
  - name: endpoint
    dtype: string
  splits:
  - name: english
    num_bytes: 1924827636
    num_examples: 344580
  - name: chinese
    num_bytes: 1252462076
    num_examples: 344580
  download_size: 1325800032
  dataset_size: 3177289712
configs:
- config_name: default
  data_files:
  - split: english
    path: data/english-*
  - split: chinese
    path: data/chinese-*
license: mit
language:
- en
- zh
multilingual:
  languages:
  - code: en
    name: English
    script: Latin
  - code: zh
    name: Chinese
    script: Han
pretty_name: Dark Thoughts Stakeholders
tags:
- business
- case
- business case
- synthetic
- synthetic data
- enterprise
- chineese
- english
- multilingual
size_categories:
- 100K<n<1M
source:
  original_dataset: DataTonic/DarkThoughts-CaseStudies
  original_url: https://huggingface.co/datasets/DataTonic/DarkThoughts-CaseStudies
task_categories:
- text-generation
---
# Dark Thoughts Case Studies Dataset (English-Chinese)

This dataset contains a bilingual collection of case studies with detailed stakeholder analyses in English and Chinese. Each case study includes structured information about stakeholders and their motivations, along with comprehensive case analysis and solutions.

## Dataset Description

### Overview

The dataset consists of 344,580 case studies in English and in Chinese, with detailed stakeholder analyses and solutions. Each entry contains:
- Initial case study information
- Structured stakeholder analysis (with roles and motivations)
- Proposed solutions and outcomes

### Languages
- English
- Chinese

### Dataset Size
- Total Examples: 689,160 (344,580 per language)
- Total Size: 3.18GB
- Download Size: 1.33GB

### Data Fields

```python
{
    'case_study_info': string,      # The main case study text
    'stakeholders': [{              # List of stakeholder information
        'stakeholder': string,      # Stakeholder name/role
        'motivation': string,       # Stakeholder's motivation/interests
        'extracted': string         # Extraction status (yes/no)
    }],
    'case_study_solutions': string, # Proposed solutions
    'endpoint': string             # Additional metadata
}
```

## Usage

```python
from datasets import load_dataset

# Load the complete dataset
dataset = load_dataset("DataTonic/dark_thoughts_stakeholders_en_cn")

# Access English subset
english_data = dataset['english']

# Access Chinese subset
chinese_data = dataset['chinese']

# Example of accessing a single entry
example = english_data[0]
print(example['case_study_info'])
print(example['stakeholders'])
```

## Data Splits
- English: 344,580 examples
- Chinese: 344,580 examples

<details>
<summary><h3> Dataset Summary - click to reveal 👇🏻</h3></summary>

```json
{
  "Dataset Overview": {
    "Total Examples": 689160,
    "Languages": [
      "english",
      "chinese"
    ],
    "Features": [
      "case_study_info",
      "stakeholders",
      "case_study_solutions",
      "endpoint"
    ]
  },
  "English Statistics": {
    "Case Studies": {
      "Total Cases": 344580,
      "Average Length": 1183.35,
      "Median Length": 1124.0
    },
    "Stakeholders": {
      "Average per Case": 7.42,
      "Total Stakeholders": 2557483,
      "Extraction Success Rate": "98.92%",
      "Unique Stakeholder Types": 6135
    },
    "Solutions": {
      "Total Solutions": 344474,
      "Average Length": 3008.36,
      "Median Length": 2900.0
    }
  },
  "Chinese Statistics": {
    "Case Studies": {
      "Total Cases": 344580,
      "Average Length": 588.19,
      "Median Length": 413.0
    },
    "Stakeholders": {
      "Average per Case": 3.19,
      "Total Stakeholders": 1099585,
      "Extraction Success Rate": "89.08%",
      "Unique Stakeholder Types": 2397
    },
    "Solutions": {
      "Total Solutions": 279274,
      "Average Length": 751.44,
      "Median Length": 729.0
    }
  }
}
```

![image/png](https://cdn-uploads.huggingface.co/production/uploads/62a3bb1cd0d8c2c2169f0b88/oU4vu1lzaa6CMeVSZ9ggj.png)


![image/png](https://cdn-uploads.huggingface.co/production/uploads/62a3bb1cd0d8c2c2169f0b88/UvtXeA-Y_XILDkSatKFan.png)


![image/png](https://cdn-uploads.huggingface.co/production/uploads/62a3bb1cd0d8c2c2169f0b88/Id-0xdWnQyDEKrmKmEOyj.png)

</details>

<details>
  <summary><h3>Datatset Statistics - Click to Reveal 👇🏻</h3></summary>

```json
{
  "general": {
    "total_examples": 689160,
    "num_splits": 2,
    "splits": [
      "english",
      "chinese"
    ],
    "features": [
      "case_study_info",
      "stakeholders",
      "case_study_solutions",
      "endpoint"
    ]
  },
  "english": {
    "case_studies": {
      "mean_length": 1183.348815949852,
      "median_length": 1124.0,
      "std_length": 237.24842276352746,
      "min_length": 765,
      "max_length": 4254,
      "total_cases": 344580
    },
    "solutions": {
      "mean_length": 3008.3600387837687,
      "median_length": 2900.0,
      "std_length": 666.6777379898515,
      "min_length": 1740,
      "max_length": 9413,
      "total_solutions": 344474
    },
    "stakeholders": {
      "avg_per_case": 7.422029717337048,
      "median_per_case": 10.0,
      "max_per_case": 19,
      "min_per_case": 1,
      "extraction_success_rate": 0.989156221658562,
      "total_stakeholders": 2557483,
      "unique_stakeholder_types": 6135,
      "extraction_counts": {
        "yes": 2640510,
        "no": 28947,
        "total": 2669457
      },
      "top_10_stakeholder_types": {
        "CEO": 87587,
        "Chief Technology Officer (CTO)": 44691,
        "Mark Thompson": 42735,
        "CTO": 30765,
        "FULL_SECTION": 28947,
        "John Doe": 26284,
        "John Smith": 25049,
        "Jane Smith": 24809,
        "Chief Technology Officer": 20356,
        "Chief Financial Officer (CFO)": 18396
      }
    }
  },
  "chinese": {
    "case_studies": {
      "mean_length": 588.1912763364095,
      "median_length": 413.0,
      "std_length": 417.8522164970989,
      "min_length": 129,
      "max_length": 5093,
      "total_cases": 344580
    },
    "solutions": {
      "mean_length": 751.435436166632,
      "median_length": 729.0,
      "std_length": 238.85160134287722,
      "min_length": 222,
      "max_length": 3673,
      "total_solutions": 279274
    },
    "stakeholders": {
      "avg_per_case": 3.191087700969296,
      "median_per_case": 1.0,
      "max_per_case": 23,
      "min_per_case": 1,
      "extraction_success_rate": 0.8908415666354595,
      "total_stakeholders": 1099585,
      "unique_stakeholder_types": 2397,
      "extraction_counts": {
        "yes": 1119958,
        "no": 137233,
        "total": 1257191
      },
      "top_10_stakeholder_types": {
        "FULL_SECTION": 137233,
        "姓名": 60814,
        "李明": 28331,
        "张华": 16102,
        "刘强": 14991,
        "王丽": 14680,
        "陈静": 13382,
        "CEO": 11534,
        "刘洋": 10684,
        "人力资源经理": 10116
      }
    }
  }
}
```
</details>

## Dataset Creation

### Source Data

[DataTonic/DarkThoughts-CaseStudies](https://huggingface.co/datasets/DataTonic/DarkThoughts-CaseStudies)

<details>
  <summary><h3>Data Processing - Click To Reveal👇🏻</h3></summary>

```python

def split_case_study_english(text: str) -> Tuple[str, str, str]:
    """Split English case study into sections"""
    stakeholder_headers = [
        r"## Stakeholders",
        r"## Key Stakeholders",
        r"### Stakeholders",
        r"## 3\.\s*Stakeholders"
    ]
    
    next_section_headers = [
        r"## Situation Analysis",
        r"## Analysis",
        r"## 4\.",
        r"## Potential Solutions",
        r"## Expected Outcomes"
    ]
    
    return split_text_by_sections(text, stakeholder_headers, next_section_headers)

def split_case_study_chinese(text: str) -> Tuple[str, str, str]:
    """Split Chinese case study into sections"""
    stakeholder_headers = [
        r"## 利益相关者",
        r"## 3\.\s*利益相关者",
        r"### 利益相关者",
        r"## 相关方分析",
        r"## 三、利益相关者"
    ]
    
    next_section_headers = [
        r"## 情况分析",
        r"## 4\.",
        r"## 潜在解决方案",
        r"## 四、",
        r"## 分析"
    ]

def extract_stakeholders_english(text: str) -> List[Dict[str, str]]:
    """Enhanced stakeholder extraction for English text"""
    stakeholders = []
    
    patterns = [
        # Standard table pattern
        r'\|\s*(.*?)\s*\|\s*(.*?)\s*\|\s*(.*?)\s*\|',
        
        # Multilevel list patterns
        r'(?:[-\*•]\s*)+\*\*(.*?)\*\*\s*[-:]\s*(.*?)(?=\n|$)',
        r'(?:    |\t)*[-\*•]\s*\*\*(.*?)\*\*\s*[-:]\s*(.*?)(?=\n|$)',
        
        # Numbered list patterns with sub-items
        r'(?:\d+\.)*\d+\.\s*\*\*(.*?)\*\*\s*[-:]\s*(.*?)(?=\n|$)',
        r'(?:    |\t)*(?:\d+\.)*\d+\.\s*\*\*(.*?)\*\*\s*[-:]\s*(.*?)(?=\n|$)',
        
        # Role-based patterns with variations
        r'\*\*(.*?)\*\*\s*[-–:]\s*(.*?)(?=\n|$)',
        r'(?:Role|Stakeholder):\s*\*\*(.*?)\*\*\s*[-–:]\s*(.*?)(?=\n|$)',
        
        # Section-based patterns
        r'### (.*?)\n+((?:(?!###).*\n)*)',
        r'#### (.*?)\n+((?:(?!####).*\n)*)',
        
        # Colon-based patterns
        r'(.*?):\s*(.*?)(?=\n|$)',
    ]
    
    section_extracted = False
    
    for pattern in patterns:
        matches = re.findall(pattern, text, re.MULTILINE | re.DOTALL)
        if matches:
            if len(matches[0]) == 3:  # Table format
                matches = [(m[0], m[2]) for m in matches if 'role' not in m[0].lower()]
            for match in matches:
                stakeholder = match[0].strip().replace('*', '')
                motivation = match[1].strip()
                if stakeholder and motivation and not any(s['stakeholder'] == stakeholder for s in stakeholders):
                    stakeholders.append({
                        "stakeholder": stakeholder,
                        "motivation": motivation,
                        "extracted": "yes"
                    })
                    section_extracted = True
    
    if not section_extracted:
        stakeholders.append({
            "stakeholder": "FULL_SECTION",
            "motivation": text.strip(),
            "extracted": "no"
        })
    
    return stakeholders

def extract_stakeholders_chinese(text: str) -> List[Dict[str, str]]:
    """Enhanced stakeholder extraction for Chinese text"""
    stakeholders = []
    
    patterns = [
        # Chinese table patterns
        r'\|\s*(.*?)\s*\|\s*(.*?)\s*\|\s*(.*?)\s*\|',
        
        # Chinese list patterns with variations
        r'(?:[-•＊※·]\s*)+\*\*(.*?)\*\*[:：]\s*(.*?)(?=\n|$)',
        r'(?:    |\t)*[-•＊※·]\s*\*\*(.*?)\*\*[:：]\s*(.*?)(?=\n|$)',
        
        # Chinese numbered patterns
        r'(?:\d+\.)*\d+[\.、]\s*\*\*(.*?)\*\*[:：]\s*(.*?)(?=\n|$)',
        r'(?:    |\t)*(?:\d+\.)*\d+[\.、]\s*\*\*(.*?)\*\*[:：]\s*(.*?)(?=\n|$)',
        
        # Chinese section patterns
        r'### (.*?)\n+((?:(?!###).*\n)*)',
        r'#### (.*?)\n+((?:(?!####).*\n)*)',
        
        # Chinese role patterns
        r'\*\*(.*?)\*\*[:：]\s*(.*?)(?=\n|$)',
        r'(?:角色|职位|相关方)[:：]\s*\*\*(.*?)\*\*[:：]\s*(.*?)(?=\n|$)',
        
        # Additional Chinese patterns
        r'(.*?)[:：]\s*(.*?)(?=\n|$)',
    ]
    
    section_extracted = False
    
    for pattern in patterns:
        matches = re.findall(pattern, text, re.MULTILINE | re.DOTALL)
        if matches:
            if len(matches[0]) == 3:  # Table format
                matches = [(m[0], m[2]) for m in matches if '职位' not in m[0] and '角色' not in m[0]]
            for match in matches:
                stakeholder = match[0].strip().replace('*', '')
                motivation = match[1].strip()
                if stakeholder and motivation and not any(s['stakeholder'] == stakeholder for s in stakeholders):
                    stakeholders.append({
                        "stakeholder": stakeholder,
                        "motivation": motivation,
                        "extracted": "yes"
                    })
                    section_extracted = True
    
    if not section_extracted:
        stakeholders.append({
            "stakeholder": "FULL_SECTION",
            "motivation": text.strip(),
            "extracted": "no"
        })
    
    return stakeholders
```
</details>

## License

MIT License

## Citation
```bibtex
@dataset{dark_thoughts_casestudies,
  author       = {[Joseph Pollack]},
  title        = {Dark Thoughts Case Studies Stakeholders Dataset},
  year         = {2025},
  publisher    = {Hugging Face},
  howpublished = {\url{https://huggingface.co/datasets/DataTonic/dark_thoughts_stakeholders_en_cn}}
}
```

## Considerations
- The stakeholder extraction system may not capture all stakeholders in complex cases
- The 'extracted' field indicates whether structured extraction was successful
- Some entries may contain the full text in the stakeholder section when structured extraction wasn't possible

### Contributions

Contributions to improve the dataset are welcome. Please submit a pull request or open an issue to discuss proposed changes.

## Limitations

[Add any known limitations or biases in the dataset]

## Ethical Considerations

[Add any ethical considerations or guidelines for usage]

## Acknowledgements

[Add relevant acknowledgements]

## Contact

[Add contact information]

---
For more information or to report issues, please visit the [dataset repository](https://huggingface.co/datasets/DataTonic/dark_thoughts_stakeholders_en_cn).