ngrams_parser 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6c3cdef6702ffbc5a36f42d454a3bb491abf72f0
4
- data.tar.gz: 69e88fdec44a26144c90f668be1c80ed97c804e3
3
+ metadata.gz: 333bac9861f67ff93ef439bb3d4cfd6e650726d2
4
+ data.tar.gz: 9c59e4950f5934800b164086ab3ddddfccb38980
5
5
  SHA512:
6
- metadata.gz: a1c60d03f3802948359c7e3993a315e62b481a15179b7ae2f9c5c0bc44066f1bf3919d59f8b15a7d35288414e074448ca0def7815fc58f034091f95f495d2f83
7
- data.tar.gz: 5c936796efb35bddadfe3d34381c5cba344ddff8c2d86fe169a95bed70ed6086c785a1aee19509ba9f6204084e6c079ce4d1d1d4a475d131d9985391b9f9073e
6
+ metadata.gz: 913a140a49a661de1ba0816a211b896d47fed06736649d8f82b06225ccad00c82806eba328092c8f382cf649fac389ff74e9327a7a5d8d678038137017e007a1
7
+ data.tar.gz: 9b1e80fc1a0b38b26b2a76b3ac4ea44a098e81b1906cfa9f52ce9240a581fcfaa44effdeea4160c45edd2e239051bbcae9e6838b240fdf03f1b9e5b91302c729
data/.rubocop.yml ADDED
@@ -0,0 +1,3 @@
1
+ LineLength:
2
+ Enabled: true
3
+ Max: 79
data/CHANGELOG.md CHANGED
@@ -13,3 +13,7 @@
13
13
  ## v0.0.4
14
14
 
15
15
  * code clean up
16
+
17
+ ## v0.0.5
18
+
19
+ Nothing new. Updated rspec tests v3.0
data/Gemfile CHANGED
@@ -5,9 +5,11 @@ gemspec
5
5
 
6
6
  group :development, :test do
7
7
  gem 'coveralls', require: false
8
- gem 'rspec'
8
+ gem 'codeclimate-test-reporter', require: false
9
+ gem 'rspec', '~> 3.0.0.beta1'
9
10
  gem 'reek'
10
11
  gem 'guard'
11
12
  gem 'guard-bundler'
12
13
  gem 'guard-rspec'
14
+ gem 'rb-readline', '~> 0.5.0', require: false
13
15
  end
data/README.md CHANGED
@@ -1,4 +1,10 @@
1
- # NgramsParser [![Gem Version](https://badge.fury.io/rb/ngrams_parser.png)](http://badge.fury.io/rb/ngrams_parser) [![Build Status](https://travis-ci.org/fractalsoft/ngrams_parser.png)](https://travis-ci.org/fractalsoft/ngrams_parser) [![Dependency Status](https://gemnasium.com/fractalsoft/ngrams_parser.png)](https://gemnasium.com/fractalsoft/ngrams_parser) [![Coverage Status](https://coveralls.io/repos/fractalsoft/ngrams_parser/badge.png)](https://coveralls.io/r/fractalsoft/ngrams_parser) [![Stories in Ready](https://badge.waffle.io/fractalsoft/ngrams_parser.png)](http://waffle.io/fractalsoft/ngrams_parser)
1
+ # NgramsParser
2
+ [![Gem Version](https://badge.fury.io/rb/ngrams_parser.png)](http://badge.fury.io/rb/ngrams_parser)
3
+ [![Build Status](https://travis-ci.org/fractalsoft/ngrams_parser.png)](https://travis-ci.org/fractalsoft/ngrams_parser)
4
+ [![Dependency Status](https://gemnasium.com/fractalsoft/ngrams_parser.png)](https://gemnasium.com/fractalsoft/ngrams_parser)
5
+ [![Coverage Status](https://coveralls.io/repos/fractalsoft/ngrams_parser/badge.png)](https://coveralls.io/r/fractalsoft/ngrams_parser)
6
+ [![Code Climate](https://codeclimate.com/repos/5284c251c7f3a33dc601754f/badges/1003ccd7b66d8d8cae42/gpa.png)](https://codeclimate.com/repos/5284c251c7f3a33dc601754f/feed)
7
+ [![Stories in Ready](https://badge.waffle.io/fractalsoft/ngrams_parser.png)](http://waffle.io/fractalsoft/ngrams_parser)
2
8
  [![endorse](https://api.coderwall.com/torrocus/endorsecount.png)](https://coderwall.com/torrocus)
3
9
 
4
10
  N-gram is a contiguous sequence of n items from a given sequence of text or speech. The items are letters, but can be phonemes, syllables, words or base pairs according to the application. The n-grams typically are collected from a text or speech corpus.
data/Rakefile CHANGED
@@ -1,10 +1,10 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler/gem_tasks'
2
2
  require 'rspec/core/rake_task'
3
3
 
4
4
  desc 'Default: run specs.'
5
5
  task default: :spec
6
6
 
7
- desc "Run specs"
7
+ desc 'Run specs'
8
8
  RSpec::Core::RakeTask.new do |t|
9
- t.rspec_opts = "--tag fast"
9
+ t.rspec_opts = '--tag fast'
10
10
  end
@@ -1,4 +1,4 @@
1
1
  # Gem version
2
2
  module NgramsParser
3
- VERSION = '0.0.4'
3
+ VERSION = '0.0.5'
4
4
  end
@@ -4,21 +4,21 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
  require 'ngrams_parser/version'
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = "ngrams_parser"
7
+ spec.name = 'ngrams_parser'
8
8
  spec.version = NgramsParser::VERSION
9
- spec.authors = ["Aleksander Malaszkiewicz"]
10
- spec.email = ["info@fractalsoft.org"]
9
+ spec.authors = ['Aleksander Malaszkiewicz']
10
+ spec.email = ['info@fractalsoft.org']
11
11
  spec.summary = %q{Split text into ngrams}
12
- spec.homepage = "https://github.com/fractalsoft/ngrams_parser"
13
- spec.license = "MIT"
12
+ spec.homepage = 'https://github.com/fractalsoft/ngrams_parser'
13
+ spec.license = 'MIT'
14
14
 
15
15
  spec.files = `git ls-files`.split($/)
16
16
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
17
17
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
18
- spec.require_paths = ["lib"]
18
+ spec.require_paths = ['lib']
19
19
 
20
- spec.add_development_dependency "bundler", "~> 1.3"
21
- spec.add_development_dependency "rake"
20
+ spec.add_development_dependency 'bundler', '~> 1.3'
21
+ spec.add_development_dependency 'rake'
22
22
 
23
- spec.add_dependency "lexical_units"
23
+ spec.add_dependency 'lexical_units'
24
24
  end
@@ -20,11 +20,11 @@ describe NgramsParser do
20
20
  text, bigrams, trigrams = hash.values
21
21
 
22
22
  it "split word '#{text}' into bigrams: #{bigrams}" do
23
- subject.ngram(text, 2).should eq(bigrams)
23
+ expect(subject.ngram(text, 2)).to eq(bigrams)
24
24
  end
25
25
 
26
26
  it "split word '#{text}' into trigrams: #{trigrams}" do
27
- subject.ngram(text, 3).should eq(trigrams)
27
+ expect(subject.ngram(text, 3)).to eq(trigrams)
28
28
  end
29
29
  end
30
30
  end
@@ -126,11 +126,11 @@ describe NgramsParser do
126
126
  text, bigrams, trigrams = hash.values
127
127
 
128
128
  it "split text '#{text}' into bigrams" do
129
- subject.ngrams(text, 2).should eq(bigrams)
129
+ expect(subject.ngrams(text, 2)).to eq(bigrams)
130
130
  end
131
131
 
132
132
  it "split text '#{text}' into trigrams" do
133
- subject.ngrams(text, 3).should eq(trigrams)
133
+ expect(subject.ngrams(text, 3)).to eq(trigrams)
134
134
  end
135
135
  end
136
136
  end
@@ -23,9 +23,9 @@ describe NgramsParser::String do
23
23
  'ipsu', 'psum', 'sum ', 'um ', 'm '
24
24
  ]
25
25
 
26
- string.ngrams(2).should eq(bigrams)
27
- string.ngrams(3).should eq(trigrams)
28
- string.ngrams(4).should eq(quadgrams)
26
+ expect(string.ngrams(2)).to eq(bigrams)
27
+ expect(string.ngrams(3)).to eq(trigrams)
28
+ expect(string.ngrams(4)).to eq(quadgrams)
29
29
  end
30
30
  end
31
31
  end
data/spec/spec_helper.rb CHANGED
@@ -1,9 +1,10 @@
1
1
  require 'ngrams_parser'
2
2
  require 'coveralls'
3
3
  Coveralls.wear!
4
+ require 'codeclimate-test-reporter'
5
+ CodeClimate::TestReporter.start
4
6
 
5
7
  RSpec.configure do |config|
6
- config.treat_symbols_as_metadata_keys_with_true_values = true
7
8
  config.run_all_when_everything_filtered = true
8
9
  config.filter_run :focus
9
10
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ngrams_parser
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Aleksander Malaszkiewicz
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-08-13 00:00:00.000000000 Z
11
+ date: 2013-11-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -61,6 +61,7 @@ extra_rdoc_files: []
61
61
  files:
62
62
  - .gitignore
63
63
  - .rspec
64
+ - .rubocop.yml
64
65
  - .ruby-gemset
65
66
  - .ruby-version
66
67
  - .travis.yml
@@ -100,7 +101,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
101
  version: '0'
101
102
  requirements: []
102
103
  rubyforge_project:
103
- rubygems_version: 2.0.3
104
+ rubygems_version: 2.0.7
104
105
  signing_key:
105
106
  specification_version: 4
106
107
  summary: Split text into ngrams