Skip to content

Commit

Permalink
fix: Rename Spacy to SpaCy
Browse files Browse the repository at this point in the history
  • Loading branch information
xmnlab committed Nov 19, 2024
1 parent 5768119 commit ae6826b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/rago/augmented/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@
from rago.augmented.base import AugmentedBase
from rago.augmented.openai import OpenAIAug
from rago.augmented.sentence_transformer import SentenceTransformerAug
from rago.augmented.spacy import SpacyAug
from rago.augmented.spacy import SpaCyAug

__all__ = [
'AugmentedBase',
'OpenAIAug',
'SentenceTransformerAug',
'SpacyAug',
'SpaCyAug',
]
2 changes: 1 addition & 1 deletion src/rago/augmented/spacy.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@


@typechecked
class SpacyAug(AugmentedBase):
class SpaCyAug(AugmentedBase):
"""Class for augmentation with SpaCy embeddings."""

default_model_name = 'en_core_web_md'
Expand Down
4 changes: 2 additions & 2 deletions tests/test_retrieval_pdf.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import pytest

from rago.augmented import SpacyAug
from rago.augmented import SpaCyAug
from rago.retrieval import PDFPathRet

PDF_DATA_PATH = Path(__file__).parent / 'data' / 'pdf'
Expand Down Expand Up @@ -43,7 +43,7 @@ def test_retrieval_pdfs_extraction_aug_spacy(

aug_top_k = 3

aug_openai = SpacyAug(top_k=aug_top_k)
aug_openai = SpaCyAug(top_k=aug_top_k)
aug_result = aug_openai.search(query, documents=chunks)

assert aug_result
Expand Down
8 changes: 4 additions & 4 deletions tests/test_spacy.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
"""Tests for Rago package using Spacy."""
"""Tests for Rago package using SpaCy."""

from rago.augmented import SpacyAug
from rago.augmented import SpaCyAug
from rago.retrieval import StringRet


def test_aug_spacy(animals_data: list[str]) -> None:
"""Test RAG pipeline with Spacy."""
"""Test RAG pipeline with SpaCy."""
logs = {
'augmented': {},
}
Expand All @@ -14,7 +14,7 @@ def test_aug_spacy(animals_data: list[str]) -> None:
top_k = 3

ret_string = StringRet(animals_data)
aug_openai = SpacyAug(
aug_openai = SpaCyAug(
top_k=top_k,
logs=logs['augmented'],
)
Expand Down

0 comments on commit ae6826b

Please sign in to comment.