# NodeBox

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

# wordnet.sense()

## Syntax

    sense(i)

## Description

Sets the sense of a word to work on. The first sense is the main interpretation of a word. This is a state function: calling sense(0) would make all following commands interpret tree as a tree in a wood, until another sense is set. All possible of senses for a word are retrievable with the senses() command.

## Example

The word tree has three senses: tree, tree as in tree diagram, and Tree as in Sir Herbert Beerbohm Tree.

    wordnet = ximport("wordnet")
    print wordnet.senses("tree")
    >>>[['tree'], ['tree', 'tree diagram'], ['Tree', 'Sir Herbert Beerbohm Tree']]