From db16b5d3c2de7d3ee6378847173e5e550cd3662a Mon Sep 17 00:00:00 2001 From: LocoRichard Date: Thu, 21 Apr 2022 16:19:52 +0800 Subject: [PATCH] [DOC] Refine Readme Signed-off-by: LocoRichard --- README.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 18cea47..442e6f4 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@
-## Desription +## 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. @@ -21,7 +21,7 @@ The original model was proposed in REALM: Retrieval-Augmented Language Model Pre ## Code Example -Use the pretrained model "google/realm-cc-news-pretrained-embedder" +Use the pre-trained model "google/realm-cc-news-pretrained-embedder" to generate a text embedding for the sentence "Hello, world.". *Write the pipeline*: @@ -37,7 +37,7 @@ towhee.dc(["Hello, world."]) \ ## Factory Constructor -Create the operator via the following factory method +Create the operator via the following factory method: ***text_embedding.transformers(model_name="google/realm-cc-news-pretrained-embedder")*** @@ -48,15 +48,15 @@ Create the operator via the following factory method The model name in string. The default value is "google/realm-cc-news-pretrained-embedder". -Supported model names: +Supported model name: - google/realm-cc-news-pretrained-embedder
## Interface -The operator takes a text in string as input. -It loads tokenizer and pre-trained model using model name. +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.