import { OpenAIService } from '../../ai/openai.service';
import { LangChainService } from '../../ai/langchain.service';
/**
 * Parsed text structure interfaces
 */
export interface ParsedToken {
    text: string;
    type: 'word' | 'punctuation' | 'number' | 'symbol';
    position: number;
    length: number;
}
export interface ParsedSentence {
    text: string;
    tokens: ParsedToken[];
    type?: 'declarative' | 'interrogative' | 'imperative' | 'exclamatory';
    subject?: string;
    verb?: string;
    object?: string;
}
export interface PartOfSpeech {
    word: string;
    tag: string;
    description: string;
}
export interface SyntacticStructure {
    sentences: ParsedSentence[];
    mainClauses: string[];
    subordinateClauses: string[];
    phrases: {
        noun: string[];
        verb: string[];
        prepositional: string[];
    };
}
export interface ParsedTextResult {
    originalText: string;
    sentences: ParsedSentence[];
    partsOfSpeech: PartOfSpeech[];
    syntacticStructure: SyntacticStructure;
    tokensUsed?: number;
    language: string;
    keywords: string[];
}
/**
 * Text Parser Service for syntactic analysis and tokenization
 */
export declare class TextParserService {
    private openAIService;
    private langChainService;
    constructor(openAIService: OpenAIService, langChainService: LangChainService);
    /**
     * Parse text into structured components
     */
    parse(input: {
        text: string;
        language: string;
        keywords?: string[];
    }): Promise<ParsedTextResult>;
    /**
     * Segment text into sentences with improved handling
     */
    private segmentSentences;
    /**
     * Tokenize a single sentence
     */
    private tokenizeSentence;
    /**
     * Check if a sentence is imperative
     */
    private isImperative;
    /**
     * Extract parts of speech using OpenAI
     */
    private extractPartsOfSpeech;
    /**
     * Basic POS tagging fallback
     */
    private basicPOSTagging;
    /**
     * Analyze syntactic structure of the text
     */
    private analyzeSyntacticStructure;
    /**
     * Basic syntactic analysis fallback
     */
    private basicSyntacticAnalysis;
    /**
     * Preserve context across multiple sentences
     */
    private preserveContext;
    /**
     * Estimate token count for OpenAI
     */
    private estimateTokens;
}
//# sourceMappingURL=text-parser.service.d.ts.map