update
Browse filesThis view is limited to 50 files because it contains too many changes.
See raw diff
- augment_negative.py +12 -0
- conceptnet.py +4 -2
- dataset/train00.jsonl +0 -0
- dataset/train01.jsonl +0 -0
- dataset/train02.jsonl +0 -0
- dataset/train03.jsonl +0 -0
- dataset/train04.jsonl +0 -0
- dataset/train05.jsonl +0 -0
- dataset/train06.jsonl +0 -0
- dataset/train07.jsonl +0 -0
- dataset/train08.jsonl +0 -0
- dataset/train09.jsonl +0 -0
- dataset/train10.jsonl +0 -0
- dataset/train11.jsonl +0 -0
- dataset/train12.jsonl +0 -0
- dataset/train13.jsonl +0 -0
- dataset/train14.jsonl +0 -0
- dataset/train15.jsonl +0 -0
- dataset/train16.jsonl +0 -0
- dataset/train17.jsonl +0 -0
- dataset/train18.jsonl +0 -0
- dataset/train19.jsonl +0 -0
- dataset/train20.jsonl +0 -0
- dataset/train21.jsonl +0 -0
- dataset/train22.jsonl +0 -0
- dataset/train23.jsonl +0 -0
- dataset/train24.jsonl +0 -0
- dataset/{train.jsonl → train25.jsonl} +0 -0
- dataset/train26.jsonl +0 -0
- dataset/train27.jsonl +0 -0
- dataset/train28.jsonl +0 -0
- dataset/train29.jsonl +0 -0
- dataset/train30.jsonl +0 -0
- dataset/train31.jsonl +0 -0
- dataset/train32.jsonl +0 -0
- dataset/valid00.jsonl +0 -0
- dataset/valid01.jsonl +0 -0
- dataset/valid02.jsonl +0 -0
- dataset/valid03.jsonl +0 -0
- dataset/valid04.jsonl +0 -0
- dataset/valid05.jsonl +0 -0
- dataset/valid06.jsonl +0 -0
- dataset/valid07.jsonl +0 -0
- dataset/valid08.jsonl +0 -0
- dataset/valid09.jsonl +0 -0
- dataset/valid10.jsonl +0 -0
- dataset/valid11.jsonl +0 -0
- dataset/valid12.jsonl +0 -0
- dataset/valid13.jsonl +0 -0
- dataset/{valid.jsonl → valid14.jsonl} +0 -0
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
|
|