Upload README.md with huggingface_hub
Browse files
README.md
CHANGED
|
@@ -2,87 +2,24 @@
|
|
| 2 |
tags:
|
| 3 |
- vicinity
|
| 4 |
- vector-store
|
| 5 |
-
license: mit
|
| 6 |
-
task_categories:
|
| 7 |
-
- summarization
|
| 8 |
-
- translation
|
| 9 |
-
- question-answering
|
| 10 |
-
language:
|
| 11 |
-
- sv
|
| 12 |
-
- da
|
| 13 |
-
- 'no'
|
| 14 |
-
- nn
|
| 15 |
-
- nb
|
| 16 |
-
pretty_name: 'Scandinavian Wikipedai Vector Store '
|
| 17 |
-
dataset_info:
|
| 18 |
-
features:
|
| 19 |
-
- name: id
|
| 20 |
-
dtype: string
|
| 21 |
-
- name: url
|
| 22 |
-
dtype: string
|
| 23 |
-
- name: title
|
| 24 |
-
dtype: string
|
| 25 |
-
- name: text
|
| 26 |
-
dtype: string
|
| 27 |
-
- name: language
|
| 28 |
-
dtype: string
|
| 29 |
-
splits:
|
| 30 |
-
- name: train
|
| 31 |
-
num_bytes: 4019184994
|
| 32 |
-
num_examples: 3655450
|
| 33 |
-
download_size: 2020534914
|
| 34 |
-
dataset_size: 4019184994
|
| 35 |
-
configs:
|
| 36 |
-
- config_name: default
|
| 37 |
-
data_files:
|
| 38 |
-
- split: train
|
| 39 |
-
path: data/train-*
|
| 40 |
---
|
| 41 |
|
| 42 |
-
#
|
| 43 |
|
| 44 |
-
This dataset
|
| 45 |
-
It contains the dataset with metadata, embeddings and a FAISS vector index for approximate nearest neighbour search.
|
| 46 |
|
| 47 |
-
|
| 48 |
-
> It contains a vector space with 3655450 items.
|
| 49 |
|
| 50 |
## Usage
|
| 51 |
|
| 52 |
-
|
| 53 |
-
|
| 54 |
-
```bash
|
| 55 |
-
pip install vicinity[all] sentence-transformers
|
| 56 |
-
```
|
| 57 |
-
|
| 58 |
-
You can load the store using the following code:
|
| 59 |
|
| 60 |
```python
|
| 61 |
from vicinity import Vicinity
|
| 62 |
-
|
| 63 |
-
store = Vicinity.load_from_hub("kardosdrur/scandi-wiki-vector-store")
|
| 64 |
-
```
|
| 65 |
-
|
| 66 |
-
After loading the dataset, you can use the `vicinity.query` method to find the nearest neighbors to a vector:
|
| 67 |
-
|
| 68 |
-
```python
|
| 69 |
-
from sentence_transformers import SentenceTransformer
|
| 70 |
-
|
| 71 |
-
encoder = SentenceTransformer("static-similarity-mrl-multilingual-v1")
|
| 72 |
-
query_vector = encoder.encode("Ligger Hinnerup i Aarhus kommune?")
|
| 73 |
-
|
| 74 |
-
results = store.query(query_vector, k=3)
|
| 75 |
```
|
| 76 |
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
To reproduce the same dataset, you can use the script supplied in the repo:
|
| 80 |
-
|
| 81 |
-
```bash
|
| 82 |
-
pip install datasets vicinity[all] sentence-transformers tqdm
|
| 83 |
-
|
| 84 |
-
python scripts/build_vector_store.py
|
| 85 |
-
```
|
| 86 |
|
| 87 |
## Configuration
|
| 88 |
|
|
|
|
| 2 |
tags:
|
| 3 |
- vicinity
|
| 4 |
- vector-store
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 5 |
---
|
| 6 |
|
| 7 |
+
# Dataset Card for kardosdrur/scandi-wiki-vector-store
|
| 8 |
|
| 9 |
+
This dataset was created using the [vicinity](https://github.com/MinishLab/vicinity) library, a lightweight nearest neighbors library with flexible backends.
|
|
|
|
| 10 |
|
| 11 |
+
It contains a vector space with 3655450 items.
|
|
|
|
| 12 |
|
| 13 |
## Usage
|
| 14 |
|
| 15 |
+
You can load this dataset using the following code:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 16 |
|
| 17 |
```python
|
| 18 |
from vicinity import Vicinity
|
| 19 |
+
vicinity = Vicinity.load_from_hub("kardosdrur/scandi-wiki-vector-store")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 20 |
```
|
| 21 |
|
| 22 |
+
After loading the dataset, you can use the `vicinity.query` method to find the nearest neighbors to a vector.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 23 |
|
| 24 |
## Configuration
|
| 25 |
|