Metaphor and Meaning

In this lecture we will look at representing metaphor in wordnets (slides).

Using wordnet with metaphors!

  1. There is an enhanced version of wordnet that includes the metaphors from chainnet in the surfdrive folder omw-en:1.4.cn.xz. Note that it is newly made and I didn't transfer some information (such as counts and lexfiles, which you can get from omw-en:1.4)
    Copy it to your machine and load it
    import wn
    wn.add('omw-en:1.4.cn.xz')
    ewncn=wn.Wordnet('omw-en:1.4.cn')
    
  2. Look at the entries for lamb, what metaphors/metonymies do you see?
    
    for s in ewncn.senses('lamb', pos='n'):
       print(s.id, s.synset().definition())
       print(s.relations()) 
    
    To make it a little easier to read:
    
    for s in ewncn.senses('lamb', pos='n'):
        print(f"{s.id} «{s.synset().definition()}» {s.counts()}")
        for (rel, tgts)  in s.relations().items():
            for t in tgts:
                print(f"{rel} →  «{t.synset().definition()}»")
    
  3. Lets look for all metaphors that have a translation in a language of your choice. I chose Dutch, so I load omw-nl:1.4. There may be quite a few!
    
    ## All senses
    for s in ewncn.senses(pos='n'):
        ## senses related by metaphor
        targets = s.get_related('metaphor')
        for t in targets:
        ## translations
            lg='nl'
            slems = [l.word().lemma() for l in s.translate(lang=lg)] 
            tlems = [l.word().lemma() for l in t.translate(lang=lg)]
            ## shared translations
            overlap = [l for l in slems if l in tlems]
            if slems and tlems:
                print(f"{s.id} ({slems}) «{s.synset().definition()}» {s.counts()}")
                print(f"    →  ({tlems}) «{t.synset().definition()}»")
                print(f"    OVERLAP {overlap}")
    
    Sample output
    ...
    omw-en-windmill-04587559-n (['windmolen']) «a mill that is powered by the wind» []
        →  (['winddynamo', 'windgenerator', 'windmolen', 'windturbine']) «generator that extracts usable energy from winds»
        OVERLAP ['windmolen']
    ...
    omw-en-window-04587648-n (['glasraam', 'licht', 'raam', 'raampje', 'venster', 'vensterraam']) «a framework of wood or metal that contains a glass windowpane and is built into a wall or roof to admit light or air» []
        →  (['venster']) «a transparent panel (as of an envelope) inserted in an otherwise opaque material»
        OVERLAP ['venster']
    ...
    
    Take a look at the output, does it seem reasonable to you?

    Readings

    • George Lakoff and Mark Johnson (1980) Metaphors we live by Chicago University Press
    • Rowan Hall Maudslay, Simone Teufel, Francis Bond, and James Pustejovsky. 2024. ChainNet: Structured Metaphor and Metonymy in WordNet. In Proceedings of the 2024 Joint International Conference on Computational Linguistics, Language Resources and Evaluation (LREC-COLING 2024), pages 2984–2996, Torino, Italia. ELRA and ICCL.