spacy
Classes for augmentation with SpaCy embeddings.
Classes:
-
SpaCyAug–Class for augmentation with SpaCy embeddings.
SpaCyAug
SpaCyAug(
model_name: Optional[str] = None,
db: DBBase | None = None,
top_k: Optional[int] = None,
api_key: str = '',
api_params: dict[str, Any] | None = None,
cache: Cache | None = None,
logs: dict[str, Any] | None = None,
)
Bases: AugmentedBase
Class for augmentation with SpaCy embeddings.
Methods:
-
apply–Apply attached configuration to the step.
-
get_embedding–Retrieve the embedding for a given text using SpaCy.
-
process–Run augmentation against the current pipeline content.
-
search–Search an encoded query into vector database.
Source code in src/rago/augmented/base.py
95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 | |
apply
apply(parameters: Any) -> None
Apply attached configuration to the step.
Source code in src/rago/base.py
182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 | |
get_embedding
get_embedding(content: List[str]) -> EmbeddingType
Retrieve the embedding for a given text using SpaCy.
Source code in src/rago/augmented/spacy.py
36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |
process
Run augmentation against the current pipeline content.
Source code in src/rago/augmented/base.py
154 155 156 157 158 159 160 161 162 | |
search
search(
query: str, documents: list[str], top_k: int = 0
) -> list[str]
Search an encoded query into vector database.
Source code in src/rago/augmented/spacy.py
58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 | |