Roudranil commited on
Commit
2f43e32
·
1 Parent(s): 13db2aa

removed loading script and added frontmatter

Browse files
README.md CHANGED
@@ -1,14 +1,30 @@
1
  ---
2
  language:
3
- - en
4
  tags:
5
- - fine-tuning
6
- - shakespeare
7
  pretty_name: SandMec
8
  size_categories:
9
- - n<10K
10
  task-categories:
11
- - text-generation
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
12
  ---
13
 
14
  # Dataset Card for `Shakespearean and Modern English Conversational Dataset`
 
1
  ---
2
  language:
3
+ - en
4
  tags:
5
+ - fine-tuning
6
+ - shakespeare
7
  pretty_name: SandMec
8
  size_categories:
9
+ - n<10K
10
  task-categories:
11
+ - text-generation
12
+
13
+ configs:
14
+ - default
15
+
16
+ dataset_info:
17
+ features:
18
+ - name: id
19
+ dtype: string
20
+ - name: translated_dialog
21
+ dtype: string
22
+ - name: og_response
23
+ dtype: string
24
+ config_name: default
25
+ splits:
26
+ - name: train
27
+ - name: test
28
  ---
29
 
30
  # Dataset Card for `Shakespearean and Modern English Conversational Dataset`
shakespearean-and-modern-english-conversational-dataset.py DELETED
@@ -1,73 +0,0 @@
1
- import datasets
2
- from datasets import DatasetInfo
3
- from datasets.download.download_manager import DownloadManager
4
-
5
- import pandas as pd
6
-
7
- _DESCRIPTION = """\
8
- Shakespearean and Modern English Conversational Dataset (SandMec) is a\
9
- converational dataset containing modern-english translated dialogs from\
10
- Shakespeare's works and the actual response to those dialogs as\
11
- present in the actual works.
12
- """
13
-
14
- _URL = "https://github.com/Roudranil/shakespearean-chatbot/tree/main/processed-data/"
15
- _URLS = {"train": _URL + "train-v1.csv", "test": _URL + "test-v1.csv"}
16
-
17
-
18
- class SandMecConfig(datasets.BuilderConfig):
19
- """BuilderConfig for SandMec"""
20
-
21
- def __init__(self, **kwargs):
22
- super(SandMecConfig, self).__init__(**kwargs)
23
-
24
-
25
- class SandMec(datasets.GeneratorBasedBuilder):
26
- """SandMec: The Shakespearean and Modern English Conversational Dataset (v1)"""
27
-
28
- VERSION = datasets.Version("1.0.0", "")
29
- DEFAULT_CONFIG_NAME = "default"
30
- BUILDER_CONFIGS = [
31
- SandMecConfig(
32
- name="plain_text",
33
- version=datasets.Version("1.0.0.", ""),
34
- description="Plain text",
35
- ),
36
- ]
37
-
38
- def _info(self) -> DatasetInfo:
39
- return DatasetInfo(
40
- description=_DESCRIPTION,
41
- features=datasets.Features(
42
- {
43
- "id": datasets.Value("string"),
44
- "translated_dialog": datasets.Value("string"),
45
- "og_response": datasets.Value("string"),
46
- }
47
- ),
48
- supervised_keys=None,
49
- )
50
-
51
- def _split_generators(self, dl_manager: DownloadManager):
52
- downloaded_files = dl_manager.download_and_extract(_URLS)
53
- return [
54
- datasets.SplitGenerator(
55
- name=datasets.Split.TRAIN,
56
- gen_kwargs={"filepath": downloaded_files["train"]},
57
- ),
58
- datasets.SplitGenerator(
59
- name=datasets.Split.TEST,
60
- gen_kwargs={"filepath": downloaded_files["test"]},
61
- ),
62
- ]
63
-
64
- def _generate_examples(self, filepath):
65
- dataset = pd.read_csv(filepath)
66
- for _, row in dataset.iterrows():
67
- id_ = row["id"]
68
- translated_dialog = row["translated_dialog"]
69
- response = row["og_response"]
70
- yield id_, {
71
- "translated_dialog": translated_dialog,
72
- "response": response,
73
- }