asahi417 commited on
Commit
a71dae1
1 Parent(s): 3c9b231

fix readme

Browse files
Files changed (2) hide show
  1. README.md +1 -0
  2. augment_negative.py +0 -12
README.md CHANGED
@@ -9,6 +9,7 @@ size_categories:
9
  - n<1K
10
  pretty_name: ConceptNet with High Confidence
11
  ---
 
12
  # Dataset Card for "relbert/conceptnet_relation_similarity"
13
  ## Dataset Description
14
  - **Repository:** [RelBERT](https://github.com/asahi417/relbert)
 
9
  - n<1K
10
  pretty_name: ConceptNet with High Confidence
11
  ---
12
+
13
  # Dataset Card for "relbert/conceptnet_relation_similarity"
14
  ## Dataset Description
15
  - **Repository:** [RelBERT](https://github.com/asahi417/relbert)
augment_negative.py DELETED
@@ -1,12 +0,0 @@
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]))