# NodeBox

Create visual output with Python programming code
Home Download Reference Tutorial Library Gallery About

# wordnet.senses()

## Syntax

    senses(query)

## Description

Returns all senses for query, in the specified grammar. Senses are returned as a list, in which each element itself is a list of synonyms. You can set a specific state to work on with the sense() command.

## Example

The word tree has three senses. It's main sense is tree as an organical structure.

    wordnet = ximport("wordnet")
    wordnet.sense(0)
    print wordnet.gloss("tree")
    >>>a tall perennial woody plant having a main trunk and branches
    >>>forming a distinct elevated crown;
    >>>includes both gymnosperms and angiosperms

Another interpretation would be a tree diagram.

    wordnet.sense(1)
    print wordnet.gloss("tree")
    >>>a figure that branches from a single root; "genealogical tree"