Datasets:
Modalities:
Text
Formats:
parquet
Languages:
code
Size:
10M - 100M
Tags:
code-search
hard-negatives
knowledge-distillation
contrastive-learning
sentence-transformers
colbert
License:
Update README.md
Browse files
README.md
CHANGED
|
@@ -564,9 +564,9 @@ documents = load_dataset(
|
|
| 564 |
name="documents_python",
|
| 565 |
split="train",
|
| 566 |
)
|
| 567 |
-
|
| 568 |
### ハードネガティブの抽出
|
| 569 |
-
|
| 570 |
# クエリ・文書テキストの辞書を構築
|
| 571 |
query_texts = dict(zip(queries["query_id"], queries["query"]))
|
| 572 |
doc_texts = dict(zip(documents["document_id"], documents["document"]))
|
|
@@ -587,4 +587,7 @@ for doc_id, score in zip(sample["document_ids"][1:], sample["scores"][1:]):
|
|
| 587 |
|
| 588 |
print(f"Query: {query_text[:100]}...")
|
| 589 |
print(f"Positive: {positive_doc[:100]}...")
|
| 590 |
-
print(f"Hard negatives: {len(hard_negatives)}")
|
|
|
|
|
|
|
|
|
|
|
|
| 564 |
name="documents_python",
|
| 565 |
split="train",
|
| 566 |
)
|
| 567 |
+
```
|
| 568 |
### ハードネガティブの抽出
|
| 569 |
+
```python
|
| 570 |
# クエリ・文書テキストの辞書を構築
|
| 571 |
query_texts = dict(zip(queries["query_id"], queries["query"]))
|
| 572 |
doc_texts = dict(zip(documents["document_id"], documents["document"]))
|
|
|
|
| 587 |
|
| 588 |
print(f"Query: {query_text[:100]}...")
|
| 589 |
print(f"Positive: {positive_doc[:100]}...")
|
| 590 |
+
print(f"Hard negatives: {len(hard_negatives)}")
|
| 591 |
+
```
|
| 592 |
+
## 作成に使用されたプログラム
|
| 593 |
+
[リポジトリはこちら](https://github.com/Shun0212/hard-negatives-ranking-datasets-maker)
|