Update README.md
Browse files
README.md
CHANGED
@@ -34,11 +34,11 @@ Files generated from the Swiss [publication platform for federal law](https://ww
|
|
34 |
|
35 |
Each article has the following type definition:
|
36 |
|
37 |
-
## paraphrase-multilingual-mpnet-base-v2
|
38 |
- swiss-civil-code-de-paraphrase-multilingual-mpnet-base-v2.jsonl
|
39 |
- swiss-code-of-obligations-en-paraphrase-multilingual-mpnet-base-v2.jsonl
|
40 |
|
41 |
-
## gte-small
|
42 |
- swiss-code-of-obligations-en-gte-small.jsonl
|
43 |
|
44 |
|
@@ -56,12 +56,42 @@ You can also find the original HTML where the data was extracted from.
|
|
56 |
|
57 |
- [html](https://huggingface.co/datasets/brunnolou/swiss-code-of-obligations/resolve/main/swiss-code-of-obligations.html)
|
58 |
|
59 |
-
|
60 |
|
61 |
-
|
|
|
|
|
62 |
|
63 |
-
|
64 |
|
65 |
- [Snapshot - Qdrant verstion v1.6.1 (zip)](https://huggingface.co/datasets/brunnolou/swiss-code-of-obligations/resolve/main/swiss-code-of-obligations-articles-gte-small-2023-10-18-12-13-25_qdrant-v1-6-1.snapshot.zip)
|
66 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
67 |
<img src="https://cdn-uploads.huggingface.co/production/uploads/65256343a9f5b404762da984/LgxeBf0Bu_IkFtM3niWfq.png" width=480 />
|
|
|
34 |
|
35 |
Each article has the following type definition:
|
36 |
|
37 |
+
## With vector embeddings by [Xenova/paraphrase-multilingual-mpnet-base-v2](https://huggingface.co/Xenova/paraphrase-multilingual-mpnet-base-v2)
|
38 |
- swiss-civil-code-de-paraphrase-multilingual-mpnet-base-v2.jsonl
|
39 |
- swiss-code-of-obligations-en-paraphrase-multilingual-mpnet-base-v2.jsonl
|
40 |
|
41 |
+
## With vector embeddings by [Xenova/gte-small](https://huggingface.co/Xenova/gte-small)
|
42 |
- swiss-code-of-obligations-en-gte-small.jsonl
|
43 |
|
44 |
|
|
|
56 |
|
57 |
- [html](https://huggingface.co/datasets/brunnolou/swiss-code-of-obligations/resolve/main/swiss-code-of-obligations.html)
|
58 |
|
59 |
+
# [Qdrant Vector Database](https://qdrant.tech/?gad_source=1&gclid=Cj0KCQiAgK2qBhCHARIsAGACuzkk-MhJWFZdKbwre95q-otN_mlcz4xcYH1aqTm8fVP0TRRiFkKbJ1QaAp27EALw_wcB)
|
60 |
|
61 |
+
### With vector embeddings by [Xenova/paraphrase-multilingual-mpnet-base-v2](https://huggingface.co/Xenova/paraphrase-multilingual-mpnet-base-v2)
|
62 |
+
- [swiss-civil-code-de-paraphrase-multilingual-mpnet-base-v2.snapshot.zip](https://huggingface.co/datasets/brunnolou/swiss-code-of-obligations/resolve/main/swiss-civil-code-de-paraphrase-multilingual-mpnet-base-v2.snapshot.zip)
|
63 |
+
- [swiss-code-of-obligations-en-paraphrase-multilingual-mpnet-base-v2.snapshot.zip](https://huggingface.co/datasets/brunnolou/swiss-code-of-obligations/resolve/main/swiss-code-of-obligations-en-paraphrase-multilingual-mpnet-base-v2.snapshot.zip)
|
64 |
|
65 |
+
## With vector embeddings by [Xenova/gte-small](https://huggingface.co/Xenova/gte-small)
|
66 |
|
67 |
- [Snapshot - Qdrant verstion v1.6.1 (zip)](https://huggingface.co/datasets/brunnolou/swiss-code-of-obligations/resolve/main/swiss-code-of-obligations-articles-gte-small-2023-10-18-12-13-25_qdrant-v1-6-1.snapshot.zip)
|
68 |
|
69 |
+
|
70 |
+
### 💾 Setup Qdrant Vector Database
|
71 |
+
|
72 |
+
1. Open the Qdrant dashboard console <http://localhost:6333/dashboard#/console>
|
73 |
+
1. Create a new collection running this:
|
74 |
+
> Vector size for `gte-small` is **`384`**. For `paraphrase-multilingual-mpnet-base-v2` is **`768`**.
|
75 |
+
```curl
|
76 |
+
PUT collections/COLLECTION_NAME
|
77 |
+
{
|
78 |
+
"vectors": {
|
79 |
+
"size": 384,
|
80 |
+
"distance": "Cosine"
|
81 |
+
}
|
82 |
+
}
|
83 |
+
```
|
84 |
+
|
85 |
+
1. Download the [snapshot file](https://huggingface.co/datasets/brunnolou/swiss-code-of-obligations/resolve/main/swiss-code-of-obligations-articles-gte-small-2023-10-18-12-13-25_qdrant-v1-6-1.snapshot.zip)
|
86 |
+
1. Unzip the file using the terminal (⚠️ **_not with Finder on Mac_** ⚠️) with `unzip <file_name>`
|
87 |
+
1. Upload the file using the following command. Adapt the fields accordingly and run it from the same directory, as where your snapshot lies
|
88 |
+
|
89 |
+
```shell
|
90 |
+
curl -X POST 'http://localhost:6333/collections/swiss-or/snapshots/upload' \
|
91 |
+
-H 'Content-Type:multipart/form-data' \
|
92 |
+
-F 'snapshot=@swiss-code-of-obligations-articles-gte-small-2023-10-18-12-13-25.snapshot'
|
93 |
+
```
|
94 |
+
|
95 |
+
|
96 |
+
|
97 |
<img src="https://cdn-uploads.huggingface.co/production/uploads/65256343a9f5b404762da984/LgxeBf0Bu_IkFtM3niWfq.png" width=480 />
|