pheepa commited on
Commit
713c69a
1 Parent(s): cee84d4

back to txt

Browse files
Files changed (2) hide show
  1. data/jira-comments.tar.gz +2 -2
  2. jira-comments.py +4 -8
data/jira-comments.tar.gz CHANGED
@@ -1,3 +1,3 @@
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:c7e99a9f8fe0c2515f0ccaaa47822851d9692d79dad00fe3c98ed3b59a26ce3c
3
- size 50044654
 
1
  version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b42ffeb38afb84aaa3ddcaa5f52e32298c098bd233fa4e87bfe48d79687e8a1a
3
+ size 48259299
jira-comments.py CHANGED
@@ -65,13 +65,9 @@ class JiraComments(datasets.GeneratorBasedBuilder):
65
 
66
  def _generate_examples(self, filepath):
67
  """Yields examples."""
68
- # with open(filepath, 'r') as f:
69
- # triples = f.read().split('\n')\
70
  with open(filepath, 'r') as f:
71
- triples = json.loads(f)
72
 
73
- for i, dc in enumerate(triples):
74
- yield i, dc
75
- # for i in range(0, len(triples) - 1, 3):
76
- # l, a, b = triples[i:i+3]
77
- # yield i // 3, {"text": ' '.join([a, b]), 'labels': int(l)}
 
65
 
66
  def _generate_examples(self, filepath):
67
  """Yields examples."""
 
 
68
  with open(filepath, 'r') as f:
69
+ triples = f.read().split('\n')
70
 
71
+ for i in range(0, len(triples) - 1, 3):
72
+ l, a, b = triples[i:i+3]
73
+ yield i // 3, {"text": ' '.join([a, b]), 'labels': int(l)}