AiresPucrs/stopwords-en
收藏Hugging Face2024-10-13 更新2024-06-11 收录
下载链接:
https://hf-mirror.com/datasets/AiresPucrs/stopwords-en
下载链接
链接失效反馈官方服务:
资源简介:
---
dataset_info:
features:
- name: stopwords
dtype: string
splits:
- name: train
num_bytes: 1894
num_examples: 220
download_size: 2286
dataset_size: 1894
configs:
- config_name: default
data_files:
- split: train
path: data/train-*
language:
- en
pretty_name: Stopwords EN
size_categories:
- n<1K
license: apache-2.0
task_categories:
- text-classification
---
# Stopwords EN (Teeny-Tiny Castle)
This dataset is part of a tutorial tied to the [Teeny-Tiny Castle](https://github.com/Nkluge-correa/TeenyTinyCastle), an open-source repository containing educational tools for AI Ethics and Safety research.
## How to Use
```python
from datasets import load_dataset
dataset = load_dataset("AiresPucrs/stopwords-en", split = 'train')
```
提供机构:
AiresPucrs原始信息汇总
stopwords-en 数据集概述
概览
stopwords-en 数据集包含英语中常用停用词列表。这些词通常在文本预处理和浅层模型训练时从文本数据中移除,特别是在文本分类任务中。
数据集详情
- 数据集名称: stopwords-en
- 总大小: 220 个示例
内容
数据集包含一列字符串,包括罗马字母的所有字母、1 到 10 的数字以及英语中常用的单词,如 "day", "days", "know", "went", "like" 等。
使用方法
python from sklearn.feature_extraction.text import TfidfVectorizer
下载英语停用词列表
stopwords = load_dataset(AiresPucrs/stopwords-en, split=train)[stopwords]
通过 TfidfVectorizer 创建向量化对象
vectorizer = TfidfVectorizer(min_df=10, max_features=100000, analyzer=word, ngram_range=(1, 2), stop_words=stopwords, # 我们的停用词列表 lowercase=True)
将 TfidfVectorizer 拟合到我们的数据集
vectorizer.fit(dataset[text])
许可证
该数据集基于 Apache License 2.0 版本。



