andrewbawitlung commited on
Commit
9e34319
·
verified ·
1 Parent(s): 9c27a56

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +20 -6
README.md CHANGED
@@ -25,7 +25,22 @@ The **Twirling Mizo News Dataset** is a collection of 6,731 news articles writte
25
  - *hmarchhak*
26
 
27
  - **Largest Category:** *tualchhung* (1,686 articles)
 
 
28
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
  ## How to use
31
 
@@ -35,17 +50,16 @@ The `datasets` library allows you to load and pre-process your dataset in pure P
35
  from datasets import load_dataset
36
 
37
  twirling_mizo_news_train = load_dataset("andrewbawitlung/twirling_mizo_news", split="train")
 
38
 
39
  ```
40
  display 3 random indices
41
  ```python
42
  import random
43
- random_indices = random.sample(range(len(twirling_mizo_news_train)), 3)
44
-
45
- for idx in random_indices:
46
- random_article = twirling_mizo_news_train[idx]
47
- print(f"Category: {random_article['Category']}")
48
- print(f"Article: {random_article['Article']}\n")
49
 
50
  ```
51
 
 
25
  - *hmarchhak*
26
 
27
  - **Largest Category:** *tualchhung* (1,686 articles)
28
+ - **Training Set (80%)**: This set contains 80% of the data for each category and will be used for training machine learning models.
29
+ - **Testing Set (20%)**: This set contains the remaining 20% of the data for each category and can be used for evaluating the performance of the models.
30
 
31
+ ### Example Split
32
+
33
+ For each category, the dataset is split as follows:
34
+
35
+ 1. **Category**: "tualchhung"
36
+ - **Training Set**: 80% of articles in this category.
37
+ - **Testing Set**: 20% of articles in this category.
38
+
39
+ 2. **Category**: "khawvel"
40
+ - **Training Set**: 80% of articles in this category.
41
+ - **Testing Set**: 20% of articles in this category.
42
+
43
+ This pattern is applied to all categories in the dataset, ensuring that the splits are balanced and representative of each category.
44
 
45
  ## How to use
46
 
 
50
  from datasets import load_dataset
51
 
52
  twirling_mizo_news_train = load_dataset("andrewbawitlung/twirling_mizo_news", split="train")
53
+ twirling_mizo_news_test = load_dataset("andrewbawitlung/twirling_mizo_news", split="test")
54
 
55
  ```
56
  display 3 random indices
57
  ```python
58
  import random
59
+ for split, dataset in [("train", twirling_mizo_news_train), ("test", twirling_mizo_news_test)]:
60
+ print(f"Random samples from the {split} dataset:")
61
+ for idx in random.sample(range(len(dataset)), 5):
62
+ print(f"Index: {idx}\n{dataset[idx]}\n{'-' * 50}")
 
 
63
 
64
  ```
65