logo
Browse Source

Update readme

Signed-off-by: Jael Gu <mengjia.gu@zilliz.com>
main
Jael Gu 2 years ago
parent
commit
f6fba9a0bf
  1. 14
      README.md
  2. BIN
      result.png

14
README.md

@ -7,7 +7,7 @@
## Description
A text embedding operator takes a sentence, paragraph, or document in string as an input
and output an embedding vector in ndarray which captures the input's core semantic elements.
and outputs token embeddings which captures the input's core semantic elements.
This operator is implemented with pre-trained models from [Huggingface Transformers](https://huggingface.co/docs/transformers).
<br />
@ -329,18 +329,12 @@ If None, the operator will use default tokenizer by `model_name` from Huggingfac
<br />
***return_sentence_emb***: *bool*
The flag to output a sentence embedding for each text, defaults to True.
If False, the operator returns token embeddings for each text.
<br />
## Interface
The operator takes a piece of text in string as input.
It loads tokenizer and pre-trained model using model name.
and then return text embedding in ndarray.
and then return text embedding(s) in ndarray.
***\_\_call\_\_(txt)***
@ -349,8 +343,8 @@ and then return text embedding in ndarray.
***data***: *Union[str, list]*
​ The text in string or a list of texts.
If data is string, the operator returns embedding(s) in ndarray.
If data is a list, the operator returns embedding(s) in a list.
If data is string, the operator returns token embedding(s) in ndarray.
If data is a list, the operator returns token embedding(s) in a list.
**Returns**:

BIN
result.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.4 KiB

After

Width:  |  Height:  |  Size: 5.7 KiB

Loading…
Cancel
Save