mirror of
https://github.com/SamyRai/tercul-backend.git
synced 2025-12-27 05:11:34 +00:00
- Core Go application with GraphQL API using gqlgen - Comprehensive data models for literary works, authors, translations - Repository pattern with caching layer - Authentication and authorization system - Linguistics analysis capabilities with multiple adapters - Vector search integration with Weaviate - Docker containerization support - Python data migration and analysis scripts - Clean architecture with proper separation of concerns - Production-ready configuration and middleware - Proper .gitignore excluding vendor/, database files, and build artifacts
20 lines
481 B
Go
20 lines
481 B
Go
package linguistics
|
|
|
|
import (
|
|
"testing"
|
|
"github.com/stretchr/testify/require"
|
|
)
|
|
|
|
func TestGoVADERSentimentProvider_Score(t *testing.T) {
|
|
sp, err := NewGoVADERSentimentProvider()
|
|
require.NoError(t, err)
|
|
pos, err := sp.Score("I love this wonderful product!", "en")
|
|
require.NoError(t, err)
|
|
require.Greater(t, pos, 0.0)
|
|
neg, err := sp.Score("This is the worst thing ever. I hate it.", "en")
|
|
require.NoError(t, err)
|
|
require.Less(t, neg, 0.0)
|
|
}
|
|
|
|
|