tercul-backend/linguistics/types.go
Damir Mukimov 4957117cb6 Initial commit: Tercul Go project with comprehensive architecture
- 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
2025-08-13 07:42:32 +02:00

44 lines
968 B
Go

package linguistics
// AnalysisResult contains the results of linguistic analysis
type AnalysisResult struct {
// Basic text statistics
WordCount int
SentenceCount int
ParagraphCount int
AvgWordLength float64
AvgSentenceLength float64
// Readability metrics
ReadabilityScore float64
ReadabilityMethod string
// Linguistic features
PartOfSpeechCounts map[string]int
Entities []Entity
Keywords []Keyword
// Semantic analysis
Sentiment float64 // -1.0 to 1.0 (negative to positive)
Topics []Topic
}
// Entity represents a named entity found in text
type Entity struct {
Text string
Type string // person, location, organization, etc.
Count int
}
// Keyword represents an important keyword in the text
type Keyword struct {
Text string
Relevance float64 // 0.0 to 1.0
}
// Topic represents a topic identified in the text
type Topic struct {
Name string
Relevance float64 // 0.0 to 1.0
}