CoolFace
Datasetpublic

brunnolou/swiss-code-of-obligations

Swiss Code of Obligations (OR) and Swiss Civil Code (Part Five: The Code of Obligations) of 30 March 1911 (Status as of 1 September 2023) Files generated from the Swiss publication platform for federal law Swiss Code of Obligations Format Each article has the following type definition: With vector embeddings by Xenova/paraphrase-multilingual-mpnet-base-v2 swiss-civil-code-de-paraphrase-multilingual-mpnet-base-v2.jsonl… See the full description on the dataset page: https://huggingface.co/datasets/brunnolou/swiss-code-of-obligations.

sourceHugging Faceapache-2.0updated 3y agoView on Hugging Face
2likes187downloads
Dataset Card

Swiss Code of Obligations (OR) and Swiss Civil Code

(Part Five: The Code of Obligations) of 30 March 1911 (Status as of 1 September 2023)

Files generated from the Swiss publication platform for federal law

Swiss Code of Obligations

Format

Each article has the following type definition:

With vector embeddings by Xenova/paraphrase-multilingual-mpnet-base-v2

  • —swiss-civil-code-de-paraphrase-multilingual-mpnet-base-v2.jsonl
  • —swiss-code-of-obligations-en-paraphrase-multilingual-mpnet-base-v2.jsonl

With vector embeddings by Xenova/gte-small

  • —swiss-code-of-obligations-en-gte-small.jsonl
ts
{
  headings: string[]
  article: string
  link: string
  content: string
  vector: number[]
}

You can also find the original HTML where the data was extracted from.

Qdrant Vector Database

With vector embeddings by Xenova/paraphrase-multilingual-mpnet-base-v2

With vector embeddings by Xenova/gte-small

💾 Setup Qdrant Vector Database

  1. 1.Open the Qdrant dashboard console <http://localhost:6333/dashboard#/console>
  2. 2.Create a new collection running this:
Vector size for gte-small is `384`. For paraphrase-multilingual-mpnet-base-v2 is `768`.
curl
   PUT collections/COLLECTION_NAME
   {
     "vectors": {
       "size": 384,
       "distance": "Cosine"
     }
   }
  1. 1.Download the snapshot file
  2. 2.Unzip the file using the terminal (⚠️ _not with Finder on Mac_ ⚠️) with unzip <file_name>
  3. 3.Upload the file using the following command. Adapt the fields accordingly and run it from the same directory, as where your snapshot lies
shell
curl -X POST 'http://localhost:6333/collections/swiss-or/snapshots/upload' \
    -H 'Content-Type:multipart/form-data' \
    -F 'snapshot=@swiss-code-of-obligations-articles-gte-small-2023-10-18-12-13-25.snapshot'

<img src="https://cdn-uploads.huggingface.co/production/uploads/65256343a9f5b404762da984/LgxeBf0Bu_IkFtM3niWfq.png" width=480 />