Update README.md
Browse files
README.md
CHANGED
@@ -16,54 +16,21 @@ configs:
|
|
16 |
path: data/train-*
|
17 |
language:
|
18 |
- en
|
19 |
-
pretty_name:
|
20 |
size_categories:
|
21 |
- n<1K
|
22 |
license: apache-2.0
|
23 |
task_categories:
|
24 |
- text-classification
|
25 |
---
|
26 |
-
#
|
27 |
|
28 |
-
|
29 |
|
30 |
-
|
31 |
-
These words do not carry significant meaning and are often removed from text data during preprocessing and training in shallower models
|
32 |
-
on a text classification task.
|
33 |
-
|
34 |
-
## Dataset Details
|
35 |
-
|
36 |
-
```
|
37 |
-
- Dataset Name: stopwords-en
|
38 |
-
- Total Size: 220 demonstrations
|
39 |
-
```
|
40 |
-
|
41 |
-
## Contents
|
42 |
-
|
43 |
-
The dataset consists of one column with strings like all the letters of the Roman alphabet, numbers from 1 to 10,
|
44 |
-
and words frequently used in the English language, such as "day", "days", "know", "went", "like", etc.
|
45 |
-
|
46 |
-
## How to use
|
47 |
|
48 |
```python
|
49 |
-
from
|
50 |
-
|
51 |
-
# Download the English stopword list.
|
52 |
-
stopwords = load_dataset('AiresPucrs/stopwords-en', split='train')['stopwords']
|
53 |
-
|
54 |
-
# Create a vectorization object via `TfidfVectorizer`
|
55 |
-
vectorizer = TfidfVectorizer(min_df=10,
|
56 |
-
max_features=100000,
|
57 |
-
analyzer='word',
|
58 |
-
ngram_range=(1, 2),
|
59 |
-
stop_words=stopwords, # Our list of stopwords.
|
60 |
-
lowercase=True)
|
61 |
-
|
62 |
-
# Fit the TfidfVectorizer to our dataset.
|
63 |
-
vectorizer.fit(dataset['text'])
|
64 |
|
|
|
65 |
```
|
66 |
-
|
67 |
-
## License
|
68 |
-
|
69 |
-
This dataset is licensed under the Apache License, version 2.0.
|
|
|
16 |
path: data/train-*
|
17 |
language:
|
18 |
- en
|
19 |
+
pretty_name: Stopwords EN
|
20 |
size_categories:
|
21 |
- n<1K
|
22 |
license: apache-2.0
|
23 |
task_categories:
|
24 |
- text-classification
|
25 |
---
|
26 |
+
# Stopwords EN (Teeny-Tiny Castle)
|
27 |
|
28 |
+
This dataset is part of the 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.
|
29 |
|
30 |
+
## How to Use
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
```python
|
33 |
+
from datasets import load_dataset
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
34 |
|
35 |
+
dataset = load_dataset("AiresPucrs/stopwords-en", split = 'train')
|
36 |
```
|
|
|
|
|
|
|
|