Commit
·
f771767
1
Parent(s):
566ae2e
Update README.md
Browse files
README.md
CHANGED
|
@@ -54,7 +54,7 @@ These steps were done by the Hugging Face team.
|
|
| 54 |
|
| 55 |
- English.
|
| 56 |
|
| 57 |
-
## Dataset Structure
|
| 58 |
|
| 59 |
Each example in the dataset contains a pair of similar sentences and is formatted as a dictionary with the key "set" and a list with the sentences as "value":
|
| 60 |
|
|
@@ -67,6 +67,30 @@ Each example in the dataset contains a pair of similar sentences and is formatte
|
|
| 67 |
|
| 68 |
This dataset is useful for training Sentence Transformers models. Refer to the following post on how to train models using similar pairs of sentences.
|
| 69 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
|
| 71 |
|
| 72 |
### Source Data
|
|
|
|
| 54 |
|
| 55 |
- English.
|
| 56 |
|
| 57 |
+
## Dataset Structure
|
| 58 |
|
| 59 |
Each example in the dataset contains a pair of similar sentences and is formatted as a dictionary with the key "set" and a list with the sentences as "value":
|
| 60 |
|
|
|
|
| 67 |
|
| 68 |
This dataset is useful for training Sentence Transformers models. Refer to the following post on how to train models using similar pairs of sentences.
|
| 69 |
|
| 70 |
+
### Usage Example
|
| 71 |
+
|
| 72 |
+
Install the 🤗 Datasets library with `pip install datasets` and load the dataset from the Hub with:
|
| 73 |
+
|
| 74 |
+
```python
|
| 75 |
+
from datasets import load_dataset
|
| 76 |
+
dataset = load_dataset("embedding-data/altlex")
|
| 77 |
+
```
|
| 78 |
+
The dataset is loaded as a `DatasetDict` and has the format:
|
| 79 |
+
|
| 80 |
+
```python
|
| 81 |
+
DatasetDict({
|
| 82 |
+
train: Dataset({
|
| 83 |
+
features: ['set'],
|
| 84 |
+
num_rows: 112696
|
| 85 |
+
})
|
| 86 |
+
})
|
| 87 |
+
```
|
| 88 |
+
|
| 89 |
+
Review an example `i` with:
|
| 90 |
+
|
| 91 |
+
```python
|
| 92 |
+
dataset["train"][i]["set"]
|
| 93 |
+
```
|
| 94 |
|
| 95 |
|
| 96 |
### Source Data
|