Sha256: 3ffda98d2b0bd08874609946d057edc4a20a71f8bc01d818f8f3487c4282d98c
Contents?: true
Size: 669 Bytes
Versions: 1
Compression:
Stored size: 669 Bytes
Contents
module RSemantic class MatrixTransformer def initialize(transforms) @transforms = transforms end def apply_transforms(vector_space_model) @transforms.each do |transform| begin transform_class = RSemantic::Transform.const_get(transform) RSemantic.logger.info("Applying #{transform} transform") transform_class.transform!(vector_space_model.matrix) RSemantic.logger.info(vector_space_model) rescue => e RSemantic.logger.error("Error: Cannot perform transform: #{transform}") RSemantic.logger.error(e) end end vector_space_model end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rsemantic-0.3.0 | lib/rsemantic/matrix_transformer.rb |