返回首页

Tsvetaeva 中「爱」的修饰语:SpaCy 分析

本文描述了 Marina Tsvetaeva 诗歌的 NLP 分析,重点是单词「爱」的修饰语。识别了 281 个复合体,主要为名词、三角主题以及位置/句子长度的统计。提供 SpaCy 代码以供复现。

SpaCy 对抗 Tsvetaeva:「爱」修饰语的秘密
Advertisement 728x90

运用SpaCy分析茨维塔耶娃诗歌中'爱'的修饰语

玛丽娜·茨维塔耶娃在其抒情诗中,常通过隐喻和名词而非标准形容词来刻画'爱'。通过对她全部作品(707,487字符)的Python分析,识别出281个围绕'爱'一词的修饰语复合体。本研究使用SpaCy库提取了±4个词符上下文窗口内的依存关系。

提取修饰语

analyze_epithets函数通过SpaCy模型处理文本,重点关注'爱'的子词符(token.children)。功能词被过滤掉,而名词、完整形容词、短尾形容词和分词被提取出来。上下文窗口排除了目标词符本身。

def analyze_epithets(text):
    doc = nlp(text)
    results = {'adj_full': [], 'adj_short': [], 'noun': [], 
               'participle': [], 'other': []}
    complexes = []
    
    for token in doc:
        if token.lemma_.lower() == 'love':
           children = list(token.children)
           window_start = max(0, token.i - 4)
           window_end = min(len(doc), token.i + 5)
           window_tokens = [doc[i] for i in range(window_start, window_end) 
                           if i != token.i]
           potential_epithets = []

修饰语分布:

Google AdInline article slot
  • 名词:179个(63.7%)——如'爱是血肉'等隐喻占主导。
  • 完整形容词:81个(28.8%)。
  • 分词:10个(3.6%)。
  • 短尾形容词:8个(2.8%)。

这使茨维塔耶娃区别于典型的俄罗斯诗歌:她使用名词来等同概念,而非描述性形容词。

高频词元包括'第三'(7次出现),突显了带有第三元素(时间、命运、诗歌)的爱情三角主题。

位置分析

analyze_position函数检查'爱'在句子中的相对位置。强位置理论(开头/结尾)得到部分证实。

Google AdInline article slot
def analyze_position(doc, target_word='love'):
    position_data = []
    
    for sent in doc.sents:
        love_tokens = [t for t in sent if t.lemma_.lower() == target_word]
        
        if love_tokens:
            sent_len = len(sent)
            for token in love_tokens:
                token_idx = token.i - sent.start
                rel_pos = token_idx / sent_len if sent_len > 0 else 0
                
                position_data.append({
                    'sentence_len': sent_len,
                    'relative_position': rel_pos
                })
    
    return pd.DataFrame(position_data)

191个句子的结果:

  • 平均位置:0.473。
  • 开头(0.0–0.2):50个(26.2%)。
  • 中间(0.2–0.8):108个(56.5%)。
  • 结尾(0.8–1.0):33个(17.3%)。
  • 强位置:43.5%。

该词被融入诗歌的肌理中,而非被突出地宣示。

句子长度分析

包含'爱'的句子比平均句子更长:

Google AdInline article slot
all_sent_lengths = [len(sent) for sent in doc.sents]
avg_len_all = sum(all_sent_lengths) / len(all_sent_lengths)

sentences_with_love = [len(sent) for sent in doc.sents 
                       if any(t.lemma_.lower() == 'love' for t in sent)]
avg_len_love = sum(sentences_with_love) / len(sentences_with_love)
  • 总体平均长度:15.3个词符。
  • 含'爱'的句子:21个词符。

爱需要扩展的语境,无法简化为格言。

关键要点

  • '爱'的修饰语主要为名词(63.7%),增强了隐喻的丰富性。
  • '第三'主题出现7次,强调了情感的复杂性。
  • 该词的位置倾向于句子中间(56.5%),将其融入叙事。
  • 含'爱'的句子比平均长37%,需要解释。
  • SpaCy能有效提取依存关系,用于语文学NLP分析。

此方法适用于任何诗歌语料库:调整窗口、词元化和词性过滤器,可量化洞察风格。

— Editorial Team

Advertisement 728x90

继续阅读