i'm trying out text classification tutorials here:
i don't understand function calls in line 59 -- 65:
#creates feature selection mechanism uses words def make_full_dict(words): return dict([(word, true) word in words]) #tries using words feature selection mechanism print 'using words features' evaluate_features(make_full_dict)
shouldn't make_full_dict
called string input value words
?
without further context, bit difficult give complete answer question. seems evaluate_features
method takes function parameter; in case, don't need call function passed in parameter. evaluate_features
should that. if call function, return value of function evaluate_features
get, rather function itself
if want see function doing, add print statements in make_full_dict
method see words passed it
Comments
Post a Comment