Datasets:
Update README.md
Browse files
README.md
CHANGED
|
@@ -15,6 +15,10 @@ pretty_name: French Constitutional Council Decisions Dataset
|
|
| 15 |
size_categories:
|
| 16 |
- 10K<n<100K
|
| 17 |
license: etalab-2.0
|
|
|
|
|
|
|
|
|
|
|
|
|
| 18 |
---
|
| 19 |
|
| 20 |
# 🇫🇷 French Constitutional Council Decisions Dataset (Conseil constitutionnel)
|
|
@@ -83,8 +87,20 @@ The resulting embedding is stored as a JSON stringified array of 1024 floating p
|
|
| 83 |
## 📌 Embedding Use Notice
|
| 84 |
|
| 85 |
⚠️ The `embeddings_bge-m3` column is stored as a **stringified list** of floats (e.g., `"[-0.03062629,-0.017049594,...]"`).
|
| 86 |
-
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 :
|
| 87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 88 |
```python
|
| 89 |
import pandas as pd
|
| 90 |
import json
|
|
@@ -94,6 +110,8 @@ df = pd.read_parquet(path="constit-latest/") # Assuming that all parquet files a
|
|
| 94 |
df["embeddings_bge-m3"] = df["embeddings_bge-m3"].apply(json.loads)
|
| 95 |
```
|
| 96 |
|
|
|
|
|
|
|
| 97 |
## 📚 Source & License
|
| 98 |
|
| 99 |
## 🔗 Source :
|
|
|
|
| 15 |
size_categories:
|
| 16 |
- 10K<n<100K
|
| 17 |
license: etalab-2.0
|
| 18 |
+
configs:
|
| 19 |
+
- config_name: latest
|
| 20 |
+
data_files: "data/constit-latest/*.parquet"
|
| 21 |
+
default: true
|
| 22 |
---
|
| 23 |
|
| 24 |
# 🇫🇷 French Constitutional Council Decisions Dataset (Conseil constitutionnel)
|
|
|
|
| 87 |
## 📌 Embedding Use Notice
|
| 88 |
|
| 89 |
⚠️ The `embeddings_bge-m3` column is stored as a **stringified list** of floats (e.g., `"[-0.03062629,-0.017049594,...]"`).
|
| 90 |
+
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:
|
| 91 |
|
| 92 |
+
```python
|
| 93 |
+
import pandas as pd
|
| 94 |
+
import json
|
| 95 |
+
from datasets import load_dataset
|
| 96 |
+
# The Pyarrow library must be installed in your Python environment for this example. By doing => pip install pyarrow
|
| 97 |
+
|
| 98 |
+
dataset = load_dataset("AgentPublic/constit")
|
| 99 |
+
df = pd.DataFrame(dataset['train'])
|
| 100 |
+
df["embeddings_bge-m3"] = df["embeddings_bge-m3"].apply(json.loads)
|
| 101 |
+
```
|
| 102 |
+
|
| 103 |
+
Otherwise, if you already downloaded all parquet files from the `data/constit-latest/` folder :
|
| 104 |
```python
|
| 105 |
import pandas as pd
|
| 106 |
import json
|
|
|
|
| 110 |
df["embeddings_bge-m3"] = df["embeddings_bge-m3"].apply(json.loads)
|
| 111 |
```
|
| 112 |
|
| 113 |
+
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.
|
| 114 |
+
|
| 115 |
## 📚 Source & License
|
| 116 |
|
| 117 |
## 🔗 Source :
|