Package nltk :: Module featstruct :: Class Feature
[hide private]
[frames] | no frames]

Class Feature

source code

object --+
         |
        Feature
Known Subclasses:

A feature identifier that's specialized to put additional constraints, default values, etc.

Instance Methods [hide private]
 
__init__(self, name, default=None, display=None)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__repr__(self)
repr(x)
source code
 
__cmp__(self, other) source code
 
__hash__(self)
hash(x)
source code
 
parse_value(self, s, position, reentrances, parser) source code
 
unify_base_values(self, fval1, fval2, bindings)
If possible, return a single value..
source code

Inherited from object: __delattr__, __getattribute__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Instance Variables [hide private]
  _name
The name of this feature.
  _default
Default value for this feature.
  _display
Custom display location: can be prefix, or slash.
Properties [hide private]
  name
  default
  display

Inherited from object: __class__

Method Details [hide private]

__init__(self, name, default=None, display=None)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__hash__(self)
(Hashing function)

source code 

hash(x)

Overrides: object.__hash__
(inherited documentation)

unify_base_values(self, fval1, fval2, bindings)

source code 

If possible, return a single value.. If not, return the value UnificationFailure.


Instance Variable Details [hide private]

_default

Default value for this feature. Use None for unbound.


Property Details [hide private]

name

Get Method:
unreachable(self)

default

Get Method:
unreachable(self)

display

Get Method:
unreachable(self)