Package nltk :: Module detect
[hide private]
[frames] | no frames]

Module detect

source code

Functions for detecting a token's features. Features are stored in a dictionary which maps feature names to feature values.

(Not yet ported from NLTK: A feature encoder can then be used to translate the feature dictionary into a homogenous representation (such as a sparse boolean list), suitable for use with other processing tasks.)

Functions [hide private]
 
feature(functions)
Return a feature detector that applies the supplied functions to each token.
source code
 
get_features(str)
takes a string returns a list of tuples (feature type, feature value)
source code
 
text_feature() source code
 
stem_feature(stemmer) source code
 
demo() source code
Function Details [hide private]

feature(functions)

source code 

Return a feature detector that applies the supplied functions to each token.

Parameters:
  • functions (dictionary of functions) - one or more functions in one string argument to compute the features.