Skip to content
This repository has been archived by the owner on May 10, 2024. It is now read-only.

[DOCS]: Added docs for using spacy models in embedding functions #244

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions docs/embeddings/spacy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
---

# spaCy

Pre-trained embeddings that are available from [spaCy](https://spacy.io/models/) can be used for encoding text into vectors. They are fast, robust and good alternative for a lot of language models. To use spacy models in embedding function we have to install spacy module and also download a model of our choice. Please use the below snippet to install and download a model of our choice.

```pip install spacy```

```spacy download model_name```

For the list models please visit: [spacy-models](https://spacy.io/models/)

```python
import chromadb.utils.embedding_functions as embedding_functions
ef = embedding_functions.SpacyEmbeddingFunction(model_name="en_core_web_md")
embeddings = ef(["text-1", "text-2"])
```