Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Rename Spacy to SpaCy #24

Merged
merged 1 commit into from
Nov 19, 2024
Merged
Show file tree
Hide file tree
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
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
Loading