Ancient Korean poetry occupies a significant position in literary history because of its distinctive rhythmic organization, conventional poetic forms, and expressive treatment of human emotion. Nevertheless, automated interpretation and generation remain challenging because computational approaches may introduce thematic drift, fail to recognize metrical restrictions, or produce passages whose emotional tone is inconsistent with their intended subject. To address these issues, this study investigates keyword extraction and generative analysis through a combination of term frequency–inverse document frequency (TF-IDF) and deep-learning-based text generation. During theme planning, TF-IDF is supplemented by semantic expansion in a BERT embedding space to identify salient keywords and related expressions while maintaining topical relevance. A dual-constraint mechanism further combines a formal pattern dictionary with an emotion lexicon to guide the generation of verses that satisfy the specified structural requirements and exhibit a coherent emotional orientation. The generation framework employs sequence-to-sequence (Seq2Seq) learning, contextual representations produced by BERT, a bidirectional long short-term memory (BiLSTM) encoder, an attention mechanism, and beam search for candidate selection. The manuscript reports evaluations of thematic consistency, compliance with the selected metrical constraints, emotional expression, and the stylistic suitability of the resulting verses. The reported examples suggest that combining lexical, contextual, and structural information can support more coherent imitation of classical Korean poetry, although the correspondence between computational constraints and historically distinct Korean poetic traditions requires further examination.