import { z } from 'zod';
import { OpenAIService } from '../ai/openai.service';
import { LangChainService } from '../ai/langchain.service';
import { TextParserService } from './parsers/text-parser.service';
import { EntityExtractorService } from './extractors/entity-extractor.service';
import { TaskClassifierService } from './classifiers/task-classifier.service';
import { StructuredDataGeneratorService } from './generators/structured-data.service';
import { LanguageDetectorService } from './language-detector.service';
import { TranslationService } from './translation.service';
/**
 * NLP Pipeline Configuration
 */
export declare const NLPConfigSchema: z.ZodObject<{
    enableCaching: z.ZodDefault<z.ZodBoolean>;
    cacheMaxAge: z.ZodDefault<z.ZodNumber>;
    maxTokensPerRequest: z.ZodDefault<z.ZodNumber>;
    defaultLanguage: z.ZodDefault<z.ZodString>;
    supportedLanguages: z.ZodDefault<z.ZodArray<z.ZodString>>;
    confidenceThreshold: z.ZodDefault<z.ZodNumber>;
}, z.core.$strip>;
export type NLPConfig = z.infer<typeof NLPConfigSchema>;
/**
 * Core NLP interfaces
 */
export interface NLPInput {
    text: string;
    language?: string;
    context?: Record<string, any>;
    projectId?: string;
    userId?: string;
}
export interface ExtractedEntities {
    title?: string;
    description?: string;
    priority?: 'critical' | 'high' | 'medium' | 'low';
    deadline?: Date;
    estimatedHours?: number;
    assignees?: string[];
    dependencies?: string[];
    tags?: string[];
    acceptanceCriteria?: string[];
    mentions?: string[];
    technologies?: string[];
    confidence?: number;
}
export interface TaskClassification {
    type?: 'feature' | 'bug' | 'improvement' | 'task' | 'documentation' | 'test';
    urgency?: 'immediate' | 'urgent' | 'normal' | 'low';
    sentiment?: 'positive' | 'neutral' | 'negative';
    complexity?: 'trivial' | 'simple' | 'moderate' | 'complex' | 'very-complex';
    confidence?: number;
}
export interface NLPResult {
    success: boolean;
    entities: ExtractedEntities;
    classification: TaskClassification;
    structuredData: any;
    language: string;
    processingTime: number;
    tokensUsed?: number;
    errors?: string[];
}
/**
 * Text preprocessing utilities
 */
export declare class TextPreprocessor {
    /**
     * Clean and normalize input text
     */
    static preprocess(text: string): string;
    /**
     * Split text into sentences
     */
    static segmentSentences(text: string): string[];
    /**
     * Extract potential keywords
     */
    static extractKeywords(text: string): string[];
}
/**
 * Main NLP Service for processing natural language input
 */
export declare class NLPService {
    private textParser;
    private entityExtractor;
    private taskClassifier;
    private structuredDataGenerator;
    private openAIService;
    private langChainService;
    private languageDetector;
    private translationService;
    private config;
    private cache;
    constructor(textParser: TextParserService, entityExtractor: EntityExtractorService, taskClassifier: TaskClassifierService, structuredDataGenerator: StructuredDataGeneratorService, openAIService: OpenAIService, langChainService: LangChainService, languageDetector: LanguageDetectorService, translationService: TranslationService);
    /**
     * Load NLP configuration from environment
     */
    private loadConfig;
    /**
     * Process natural language input through the full NLP pipeline
     */
    processText(input: NLPInput): Promise<NLPResult>;
    /**
     * Calculate overall confidence score
     */
    private calculateOverallConfidence;
    /**
     * Generate cache key for input
     */
    private getCacheKey;
    /**
     * Clear cache (useful for testing or memory management)
     */
    clearCache(): void;
    /**
     * Get cache statistics
     */
    getCacheStats(): {
        size: number;
        maxAge: number;
    };
    /**
     * Process text with translation to English if needed
     */
    processTextWithTranslation(input: NLPInput): Promise<NLPResult>;
    /**
     * Get supported languages
     */
    getSupportedLanguages(): string[];
    /**
     * Check if a language is supported
     */
    isLanguageSupported(languageCode: string): boolean;
}
/**
 * NLP-specific error classes
 */
export declare class NLPError extends Error {
    code: string;
    details?: any | undefined;
    constructor(message: string, code: string, details?: any | undefined);
}
export declare class LanguageNotSupportedError extends NLPError {
    constructor(language: string);
}
export declare class ConfidenceTooLowError extends NLPError {
    constructor(confidence: number, threshold: number);
}
export declare class TokenLimitExceededError extends NLPError {
    constructor(tokens: number, limit: number);
}
//# sourceMappingURL=nlp.service.d.ts.map