Sha256: 8d53eac7d2eefdb8574ac8d703617eed1e3122d0db92c089290c8df285692e19
Contents?: true
Size: 738 Bytes
Versions: 1
Compression:
Stored size: 738 Bytes
Contents
require "spec_helper" describe Selector::NGram do it_behaves_like 'a selector' let(:ngram) { Selector::NGram.new(:function, gram_size: 3) } context "#extract_words_from_data" do it "should generate a list of words from the data" do words = ngram.extract_words_from_data(FactoryGirl.build(:data)) words.should have(4).things end it "should remove words with 3 characters or less" do words = ngram.extract_words_from_data(FactoryGirl.build(:data_w_short_words)) words.should have(2).things end it "should process multiple sections in the data" do words = ngram.extract_words_from_data(FactoryGirl.build(:data_w_multiple_sections)) words.should have(2).things end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
svm_helper-0.1.1 | spec/selectors/n_gram_spec.rb |