full issue comments
Browse files
data/jira-commentaries.tar.gz
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a82e1caea5b2d893fa98c9ab5e0b710f0ba48986fcadf4f50729f1fa3d1fbd43
|
3 |
+
size 46987358
|
jira-commentaries-mlm.py
CHANGED
@@ -18,7 +18,7 @@ _CITATION = """\
|
|
18 |
"""
|
19 |
|
20 |
_REPO = "https://huggingface.co/datasets/pheepa/jira-commentaries-mlm/resolve/main"
|
21 |
-
_URL = f"{_REPO}/data/jira-
|
22 |
|
23 |
|
24 |
class JiraComments(datasets.GeneratorBasedBuilder):
|
@@ -37,7 +37,7 @@ class JiraComments(datasets.GeneratorBasedBuilder):
|
|
37 |
description=_DESCRIPTION,
|
38 |
features=datasets.Features(
|
39 |
{
|
40 |
-
"
|
41 |
}
|
42 |
),
|
43 |
supervised_keys=None,
|
@@ -51,18 +51,18 @@ class JiraComments(datasets.GeneratorBasedBuilder):
|
|
51 |
return [
|
52 |
datasets.SplitGenerator(
|
53 |
name=datasets.Split.TRAIN,
|
54 |
-
gen_kwargs={"filepath": os.path.join(data_dir, "train-jira-
|
55 |
),
|
56 |
datasets.SplitGenerator(
|
57 |
name=datasets.Split.TEST,
|
58 |
-
gen_kwargs={"filepath": os.path.join(data_dir, "test-jira-
|
59 |
)
|
60 |
]
|
61 |
|
62 |
def _generate_examples(self, filepath):
|
63 |
"""Yields examples."""
|
64 |
with open(filepath, 'r') as f:
|
65 |
-
|
66 |
|
67 |
-
for i,
|
68 |
-
yield i, {'
|
|
|
18 |
"""
|
19 |
|
20 |
_REPO = "https://huggingface.co/datasets/pheepa/jira-commentaries-mlm/resolve/main"
|
21 |
+
_URL = f"{_REPO}/data/jira-commentaries.tar.gz"
|
22 |
|
23 |
|
24 |
class JiraComments(datasets.GeneratorBasedBuilder):
|
|
|
37 |
description=_DESCRIPTION,
|
38 |
features=datasets.Features(
|
39 |
{
|
40 |
+
"comments": datasets.Value("string"),
|
41 |
}
|
42 |
),
|
43 |
supervised_keys=None,
|
|
|
51 |
return [
|
52 |
datasets.SplitGenerator(
|
53 |
name=datasets.Split.TRAIN,
|
54 |
+
gen_kwargs={"filepath": os.path.join(data_dir, "train-all-jira-comments.txt")}
|
55 |
),
|
56 |
datasets.SplitGenerator(
|
57 |
name=datasets.Split.TEST,
|
58 |
+
gen_kwargs={"filepath": os.path.join(data_dir, "test-all-jira-comments.txt")}
|
59 |
)
|
60 |
]
|
61 |
|
62 |
def _generate_examples(self, filepath):
|
63 |
"""Yields examples."""
|
64 |
with open(filepath, 'r') as f:
|
65 |
+
comments = f.read().split('\n')
|
66 |
|
67 |
+
for i, comment in enumerate(comments):
|
68 |
+
yield i, {'comments': comment}
|