Skip to content
This repository has been archived by the owner on Oct 11, 2024. It is now read-only.

Commit

Permalink
Remove obsolete smoke test
Browse files Browse the repository at this point in the history
Language detection is no longer performed for syntactical analysis
  • Loading branch information
twaslowski committed Jun 20, 2024
1 parent 6a8bf83 commit 2d270d2
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 12 deletions.
1 change: 0 additions & 1 deletion lingolift/nlp/syntactical_analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
from spacy.tokens.token import Token



def perform_analysis(sentence: str) -> list[SyntacticalAnalysis]:
"""
Performs a syntactical analysis on a sentence in a given language.
Expand Down
11 changes: 0 additions & 11 deletions test/smoketest.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from shared.client import Client
from shared.exception import (
ApplicationException,
LanguageNotIdentifiedException,
SentenceTooLongException,
)

Expand Down Expand Up @@ -43,16 +42,6 @@ async def test_syntactical_analysis_endpoint():
assert len(analysis) > 0


@pytest.mark.asyncio
async def test_syntactical_analysis_error_message_for_invalid_language():
sentence = "Det er en norsk setning"
with pytest.raises(ApplicationException) as e:
await client.fetch_syntactical_analysis(sentence)
# Only a small subset of languages can be identified. This is dependent on the languages the
# language detector is configured to recognize. Currently, Norwegian simply will not be identified properly.
assert e.value.error_message == LanguageNotIdentifiedException().error_message


@pytest.mark.asyncio
async def test_response_suggestions_endpoint():
suggestions = await client.fetch_response_suggestions("Donde esta la biblioteca?")
Expand Down

0 comments on commit 2d270d2

Please sign in to comment.