class nltk.FeatList(features=())[source]

A list of feature values, where each feature value is either a basic value (such as a string or an integer), or a nested feature structure.

Feature lists may contain reentrant feature values. A “reentrant feature value” is a single feature value that can be accessed via multiple feature paths. Feature lists may also be cyclic.

Two feature lists are considered equal if they assign the same values to all features, and have the same reentrances.

See:FeatStruct for information about feature paths, reentrance, cyclic feature structures, mutability, freezing, and hashing.


__init__([features]) Create a new feature list, with the specified features.
append(*args, **kwargs) L.append(object) – append object to end If self is frozen, raise ValueError.
copy([deep]) Return a new copy of self.
cyclic() Return True if this feature structure contains itself.
equal_values(other[, check_reentrance]) Return True if self and other assign the same value to to every feature.
extend(*args, **kwargs) L.extend(iterable) – extend list by appending elements from the iterable If self is frozen, raise ValueError.
freeze() Make this feature structure, and any feature structures it contains, immutable.
frozen() Return True if this feature structure is immutable.
index((value, [start, ...) Raises ValueError if the value is not present.
insert(*args, **kwargs) L.insert(index, object) – insert object before index If self is frozen, raise ValueError.
pop(...) Raises IndexError if list is empty or index is out of range.
remove(*args, **kwargs) L.remove(value) – remove first occurrence of value.
remove_variables() Return the feature structure that is obtained by deleting any feature whose value is a Variable.
rename_variables([vars, used_vars, new_vars])
reverse(*args, **kwargs) L.reverse() – reverse IN PLACE If self is frozen, raise ValueError.
sort(*args, **kwargs) L.sort(cmp=None, key=None, reverse=False) – stable sort IN PLACE; cmp(x, y) -> -1, 0, 1 If self is frozen, raise ValueError.
subsumes(other) Return True if self subsumes other.
unify(other[, bindings, trace, fail, ...])
walk() Return an iterator that generates this feature structure, and each feature structure it contains.