asahi417 commited on
Commit
3ead889
1 Parent(s): 56805f6
This view is limited to 50 files because it contains too many changes.   See raw diff
augment_negative.py ADDED
@@ -0,0 +1,12 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import json
2
+ from glob import glob
3
+ from itertools import chain
4
+
5
+ for i in glob("dataset/*.jsonl"):
6
+ with open(i) as f:
7
+ tmp = [json.loads(o) for o in f.read().split('\n') if len(o) > 0]
8
+ for r in tmp:
9
+ r['negatives'] = r['negatives'] + list(
10
+ chain(*[o['positives'] for o in tmp if o['relation_type'] != r['relation_type']]))
11
+ with open(i, 'w') as f:
12
+ f.write('\n'.join([json.dumps(r) for r in tmp]))
conceptnet.py CHANGED
@@ -17,8 +17,10 @@ _CITATION = """
17
  _HOME_PAGE = "https://github.com/asahi417/relbert"
18
  _URL = f'https://huggingface.co/datasets/relbert/{_NAME}/raw/main/dataset'
19
  _URLS = {
20
- str(datasets.Split.TRAIN): [f'{_URL}/train.jsonl'],
21
- str(datasets.Split.VALIDATION): [f'{_URL}/valid.jsonl'],
 
 
22
  }
23
 
24
 
 
17
  _HOME_PAGE = "https://github.com/asahi417/relbert"
18
  _URL = f'https://huggingface.co/datasets/relbert/{_NAME}/raw/main/dataset'
19
  _URLS = {
20
+ # str(datasets.Split.TRAIN): [f'{_URL}/train.jsonl'],
21
+ # str(datasets.Split.VALIDATION): [f'{_URL}/valid.jsonl'],
22
+ str(datasets.Split.TRAIN): [f'{_URL}/train{i:02d}.jsonl' for i in range(33)],
23
+ str(datasets.Split.VALIDATION): [f'{_URL}/valid{i:02d}.jsonl' for i in range(25)],
24
  }
25
 
26
 
dataset/train00.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train01.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train02.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train03.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train04.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train05.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train06.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train07.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train08.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train09.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train10.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train11.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train12.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train13.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train14.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train15.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train16.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train17.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train18.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train19.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train20.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train21.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train22.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train23.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train24.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/{train.jsonl → train25.jsonl} RENAMED
The diff for this file is too large to render. See raw diff
 
dataset/train26.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train27.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train28.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train29.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train30.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train31.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/train32.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/valid00.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/valid01.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/valid02.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/valid03.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/valid04.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/valid05.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/valid06.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/valid07.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/valid08.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/valid09.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/valid10.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/valid11.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/valid12.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/valid13.jsonl ADDED
The diff for this file is too large to render. See raw diff
 
dataset/{valid.jsonl → valid14.jsonl} RENAMED
The diff for this file is too large to render. See raw diff