<s> try : <EOL> from scrapy_sci . features import DictVectWrapper <EOL> except : <EOL> from features import DictVectWrapper <EOL> class DataFeatures ( DictVectWrapper ) : <EOL> def __init__ ( self ) : <EOL> super ( DataFeatures , self ) . __init__ ( ) <EOL> def dimension_features ( self , datum ) : <EOL> x = float ( datum [ "<STR_LIT>" ] ) <EOL> y = float ( datum [ "<STR_LIT>" ] ) <EOL> features = { "<STR_LIT>" : x , "<STR_LIT>" : y , "<STR_LIT>" : x * y } <EOL> return features <EOL> def viewer_features ( self , datum ) : <EOL> features = { '<STR_LIT>' : float ( datum [ '<STR_LIT>' ] ) , "<STR_LIT>" : float ( datum [ '<STR_LIT>' ] ) } <EOL> return features </s>
