Update README.md
Browse files
README.md
CHANGED
|
@@ -13,6 +13,10 @@ pretty_name: French Legislative Dossiers Dataset (DOLE)
|
|
| 13 |
size_categories:
|
| 14 |
- 1K<n<10K
|
| 15 |
license: etalab-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
---
|
| 17 |
|
| 18 |
# 🇫🇷 French Legislative Dossiers Dataset (DOLE)
|
|
@@ -101,8 +105,20 @@ The resulting embedding vector is stored in the `embeddings_bge-m3` column as a
|
|
| 101 |
## 📌 Embedding Use Notice
|
| 102 |
|
| 103 |
⚠️ The `embeddings_bge-m3` column is stored as a **stringified list** of floats (e.g., `"[-0.03062629,-0.017049594,...]"`).
|
| 104 |
-
To use it as a vector, you need to parse it into a list of floats or NumPy array. For example, if you want to load the dataset into a dataframe :
|
| 105 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 106 |
```python
|
| 107 |
import pandas as pd
|
| 108 |
import json
|
|
@@ -112,6 +128,8 @@ df = pd.read_parquet(path="dole-latest/") # Assuming that all parquet files are
|
|
| 112 |
df["embeddings_bge-m3"] = df["embeddings_bge-m3"].apply(json.loads)
|
| 113 |
```
|
| 114 |
|
|
|
|
|
|
|
| 115 |
---
|
| 116 |
|
| 117 |
## 📚 Source & License
|
|
|
|
| 13 |
size_categories:
|
| 14 |
- 1K<n<10K
|
| 15 |
license: etalab-2.0
|
| 16 |
+
configs:
|
| 17 |
+
- config_name: latest
|
| 18 |
+
data_files: "data/dole-latest/*.parquet"
|
| 19 |
+
default: true
|
| 20 |
---
|
| 21 |
|
| 22 |
# 🇫🇷 French Legislative Dossiers Dataset (DOLE)
|
|
|
|
| 105 |
## 📌 Embedding Use Notice
|
| 106 |
|
| 107 |
⚠️ The `embeddings_bge-m3` column is stored as a **stringified list** of floats (e.g., `"[-0.03062629,-0.017049594,...]"`).
|
| 108 |
+
To use it as a vector, you need to parse it into a list of floats or NumPy array. For example, if you want to load the dataset into a dataframe by using the `datasets` library:
|
| 109 |
|
| 110 |
+
```python
|
| 111 |
+
import pandas as pd
|
| 112 |
+
import json
|
| 113 |
+
from datasets import load_dataset
|
| 114 |
+
# The Pyarrow library must be installed in your Python environment for this example. By doing => pip install pyarrow
|
| 115 |
+
|
| 116 |
+
dataset = load_dataset("AgentPublic/dole")
|
| 117 |
+
df = pd.DataFrame(dataset['train'])
|
| 118 |
+
df["embeddings_bge-m3"] = df["embeddings_bge-m3"].apply(json.loads)
|
| 119 |
+
```
|
| 120 |
+
|
| 121 |
+
Otherwise, if you already downloaded all parquet files from the `data/dole-latest/` folder :
|
| 122 |
```python
|
| 123 |
import pandas as pd
|
| 124 |
import json
|
|
|
|
| 128 |
df["embeddings_bge-m3"] = df["embeddings_bge-m3"].apply(json.loads)
|
| 129 |
```
|
| 130 |
|
| 131 |
+
You can then use the dataframe as you wish, such as by inserting the data from the dataframe into the vector database of your choice.
|
| 132 |
+
|
| 133 |
---
|
| 134 |
|
| 135 |
## 📚 Source & License
|