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|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: mit
|
| 3 |
+
language:
|
| 4 |
+
- en
|
| 5 |
+
---
|
| 6 |
+
# Laser Cleaning Query Relevance Dataset
|
| 7 |
+
|
| 8 |
+
## Overview
|
| 9 |
+
|
| 10 |
+
This dataset was created for training text classification models to identify customer queries relevant to laser cleaning services. It contains a comprehensive collection of text examples labeled for relevance to laser cleaning, enabling automated triage of customer inquiries for laser cleaning businesses.
|
| 11 |
+
|
| 12 |
+
## Dataset Description
|
| 13 |
+
|
| 14 |
+
- **Task**: Binary classification of text queries
|
| 15 |
+
- **Classes**:
|
| 16 |
+
- `1` = Relevant to laser cleaning
|
| 17 |
+
- `0` = Not relevant to laser cleaning
|
| 18 |
+
- **Size**: Approximately 714 examples
|
| 19 |
+
- Training set: 571 examples (80%)
|
| 20 |
+
- Test set: 143 examples (20%)
|
| 21 |
+
- **Class distribution**:
|
| 22 |
+
- Relevant queries: ~78% (557 examples)
|
| 23 |
+
- Non-relevant queries: ~22% (157 examples)
|
| 24 |
+
- **Text length**: Short to medium queries (typically 5-25 words)
|
| 25 |
+
- **Languages**: English
|
| 26 |
+
|
| 27 |
+
## Files
|
| 28 |
+
|
| 29 |
+
The dataset is available in multiple formats:
|
| 30 |
+
|
| 31 |
+
- `full_dataset.jsonl` - Complete dataset in JSONL format
|
| 32 |
+
- `train.jsonl` - Training split in JSONL format
|
| 33 |
+
- `test.jsonl` - Testing split in JSONL format
|
| 34 |
+
- `train.csv` - Training split in CSV format
|
| 35 |
+
- `test.csv` - Testing split in CSV format
|
| 36 |
+
|
| 37 |
+
### File Format
|
| 38 |
+
|
| 39 |
+
#### JSONL Format
|
| 40 |
+
```json
|
| 41 |
+
{"text": "How does laser cleaning work?", "label": 1}
|
| 42 |
+
{"text": "Weather forecast for tomorrow", "label": 0}
|
| 43 |
+
```
|
| 44 |
+
|
| 45 |
+
#### CSV Format
|
| 46 |
+
```
|
| 47 |
+
text,label
|
| 48 |
+
"How does laser cleaning work?",1
|
| 49 |
+
"Weather forecast for tomorrow",0
|
| 50 |
+
```
|
| 51 |
+
|
| 52 |
+
## Dataset Creation
|
| 53 |
+
|
| 54 |
+
This dataset was systematically generated using multiple techniques:
|
| 55 |
+
|
| 56 |
+
1. **Base examples**: Manually curated positive examples (relevant to laser cleaning) and negative examples (not relevant).
|
| 57 |
+
|
| 58 |
+
2. **Template-based generation**: Using templates with placeholders to create numerous variations:
|
| 59 |
+
```
|
| 60 |
+
"Can laser clean {thing}?"
|
| 61 |
+
"Laser cleaning for {thing} - price?"
|
| 62 |
+
```
|
| 63 |
+
|
| 64 |
+
3. **Material and problem variations**: Systematic combination of materials (e.g., "car parts", "metal gate", "bronze statue") with cleaning problems (e.g., "rust", "corrosion", "paint").
|
| 65 |
+
|
| 66 |
+
4. **Compound questions**: Multi-faceted queries combining different aspects of laser cleaning.
|
| 67 |
+
|
| 68 |
+
5. **Paraphrasing**: Alternative phrasings of base examples to increase linguistic diversity.
|
| 69 |
+
|
| 70 |
+
6. **Ambiguous examples**: Carefully labeled edge cases to help models learn boundary conditions.
|
| 71 |
+
|
| 72 |
+
## Dataset Content
|
| 73 |
+
|
| 74 |
+
### Relevant Query Categories (Label 1)
|
| 75 |
+
|
| 76 |
+
- Specific laser cleaning questions
|
| 77 |
+
- Service area questions
|
| 78 |
+
- Quote and pricing related
|
| 79 |
+
- Material-specific inquiries
|
| 80 |
+
- Common applications
|
| 81 |
+
- Edge cases that are still relevant
|
| 82 |
+
|
| 83 |
+
Examples:
|
| 84 |
+
- "How does laser cleaning work?"
|
| 85 |
+
- "Do you offer laser cleaning in Huntsville?"
|
| 86 |
+
- "How much does laser cleaning cost?"
|
| 87 |
+
- "Laser cleaning for aluminum"
|
| 88 |
+
- "Using laser to clean motorcycle parts"
|
| 89 |
+
- "Rust removal options in Huntsville"
|
| 90 |
+
|
| 91 |
+
### Non-relevant Query Categories (Label 0)
|
| 92 |
+
|
| 93 |
+
- General information requests
|
| 94 |
+
- Other services entirely
|
| 95 |
+
- Random questions
|
| 96 |
+
- Consumer products
|
| 97 |
+
- Similarly worded but different domains
|
| 98 |
+
- Other industrial services
|
| 99 |
+
|
| 100 |
+
Examples:
|
| 101 |
+
- "Weather forecast for tomorrow"
|
| 102 |
+
- "Plumbing services in Huntsville"
|
| 103 |
+
- "What's the capital of France?"
|
| 104 |
+
- "Best laptop under $1000"
|
| 105 |
+
- "How to clean my computer keyboard"
|
| 106 |
+
- "CNC machining services"
|
| 107 |
+
|
| 108 |
+
## Usage
|
| 109 |
+
|
| 110 |
+
The dataset is formatted for easy use with common ML libraries:
|
| 111 |
+
|
| 112 |
+
### Loading with Pandas
|
| 113 |
+
```python
|
| 114 |
+
import pandas as pd
|
| 115 |
+
|
| 116 |
+
# Load CSV
|
| 117 |
+
train_df = pd.read_csv('train.csv')
|
| 118 |
+
test_df = pd.read_csv('test.csv')
|
| 119 |
+
|
| 120 |
+
# Access data
|
| 121 |
+
X_train = train_df['text'].values
|
| 122 |
+
y_train = train_df['label'].values
|
| 123 |
+
```
|
| 124 |
+
|
| 125 |
+
### Loading with PyTorch and Transformers
|
| 126 |
+
```python
|
| 127 |
+
from torch.utils.data import Dataset, DataLoader
|
| 128 |
+
from transformers import BertTokenizer
|
| 129 |
+
|
| 130 |
+
class LaserCleaningDataset(Dataset):
|
| 131 |
+
def __init__(self, texts, labels, tokenizer, max_length=128):
|
| 132 |
+
self.texts = texts
|
| 133 |
+
self.labels = labels
|
| 134 |
+
self.tokenizer = tokenizer
|
| 135 |
+
self.max_length = max_length
|
| 136 |
+
|
| 137 |
+
def __len__(self):
|
| 138 |
+
return len(self.texts)
|
| 139 |
+
|
| 140 |
+
def __getitem__(self, idx):
|
| 141 |
+
text = str(self.texts[idx])
|
| 142 |
+
label = self.labels[idx]
|
| 143 |
+
|
| 144 |
+
# Tokenize the text
|
| 145 |
+
encoding = self.tokenizer(
|
| 146 |
+
text,
|
| 147 |
+
add_special_tokens=True,
|
| 148 |
+
max_length=self.max_length,
|
| 149 |
+
return_token_type_ids=False,
|
| 150 |
+
padding='max_length',
|
| 151 |
+
truncation=True,
|
| 152 |
+
return_attention_mask=True,
|
| 153 |
+
return_tensors='pt'
|
| 154 |
+
)
|
| 155 |
+
|
| 156 |
+
return {
|
| 157 |
+
'input_ids': encoding['input_ids'].flatten(),
|
| 158 |
+
'attention_mask': encoding['attention_mask'].flatten(),
|
| 159 |
+
'labels': torch.tensor(label, dtype=torch.long)
|
| 160 |
+
}
|
| 161 |
+
```
|
| 162 |
+
|
| 163 |
+
## Applications
|
| 164 |
+
|
| 165 |
+
This dataset is designed for:
|
| 166 |
+
|
| 167 |
+
1. **Query triage**: Automatically identifying customer inquiries related to laser cleaning
|
| 168 |
+
2. **Chatbot development**: Training chatbots to recognize laser cleaning queries
|
| 169 |
+
3. **Customer service automation**: Routing queries to appropriate service representatives
|
| 170 |
+
4. **Search relevance**: Enhancing search functionality for laser cleaning businesses
|
| 171 |
+
5. **Marketing analysis**: Identifying potential customer needs related to laser cleaning
|
| 172 |
+
|
| 173 |
+
## License
|
| 174 |
+
|
| 175 |
+
This dataset is provided under the [MIT License](https://opensource.org/licenses/MIT), allowing for both academic and commercial use with minimal restrictions.
|
| 176 |
+
|
| 177 |
+
## Citation
|
| 178 |
+
|
| 179 |
+
If you use this dataset in your research or applications, please cite it as:
|
| 180 |
+
|
| 181 |
+
```
|
| 182 |
+
RustBusters Laser Cleaning Query Relevance Dataset (2025)
|
| 183 |
+
Creator: RustBusters LLC
|
| 184 |
+
Version: 1.0
|
| 185 |
+
```
|
| 186 |
+
|
| 187 |
+
## Contact
|
| 188 |
+
|
| 189 |
+
For questions, improvements, or feedback about this dataset, please contact the RustBusters team.
|
| 190 |
+
|
| 191 |
+
---
|
| 192 |
+
|
| 193 |
+
*This dataset was carefully crafted to support machine learning applications in the laser cleaning industry.*
|