pragmatic_tokenizer 3.0.4 → 3.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: 00a9402728c3f1aeb845232ec6dfa1abc536bca9
4
- data.tar.gz: da25dbf18f4ebf7a780a4b0a862976b20d01eb39
3
+ metadata.gz: 3992076b1304fc76da055925e851e5d61b27dea6
4
+ data.tar.gz: ab52d479ad9f83018e18fa6c8966cd6213813646
5
5
  SHA512:
6
- metadata.gz: ced5cc4b72bba8a4d277c7453bda8aed9f82a35477a1e047348fa5f198e50647c6748bbff29484d2b002f28106afd8f5ce432c4d49142234dbf8370402f07004
7
- data.tar.gz: ef1988c4325ea1bce415685848f5d666b79ddbde26680f6b9712cdbbffd8558573733ece8c57b29c739dcce335565b8f7dbf5c3b68e213585afb0d7644c9c06d
6
+ metadata.gz: 325bba401a3cc218aa984e88828775a1718d11b8f6170d950563cdf90ef5f3a5755feaaaa6760a37a8c29fa63002c36ea48b530fb601c91ea953197e93fc7159
7
+ data.tar.gz: af2d68f841b70444ce90d5ad00b4d0cb0d33ce1d72d254d4f4cecdc10e11bab5954e8757757663097e53e29c6f143039e5d00764412e78870c933e6e784157d5
@@ -139,8 +139,11 @@ module PragmaticTokenizer
139
139
  raise "Punctuation argument can be only be nil, :all, :semi, :none, or :only" unless PUNCTIATION_OPTIONS.include?(@punctuation)
140
140
  raise "Numbers argument can be only be nil, :all, :semi, :none, or :only" unless NUMBERS_OPTIONS.include?(@numbers)
141
141
  raise "Mentions argument can be only be nil, :keep_original, :keep_and_clean, or :remove" unless MENTIONS_OPTIONS.include?(@mentions)
142
- raise "In Pragmatic Tokenizer minimum_length must be an Integer" unless @minimum_length.class == Fixnum || @minimum_length.nil?
143
- raise "In Pragmatic Tokenizer long_word_split must be an Integer" unless @long_word_split.class == Fixnum || @long_word_split.nil?
142
+
143
+ integer_class = Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.4.0') ? Fixnum : Integer
144
+
145
+ raise "In Pragmatic Tokenizer minimum_length must be an Integer" unless @minimum_length.class == integer_class || @minimum_length.nil?
146
+ raise "In Pragmatic Tokenizer long_word_split must be an Integer" unless @long_word_split.class == integer_class || @long_word_split.nil?
144
147
  end
145
148
 
146
149
  # @param [String] text to be tokenized
@@ -1,3 +1,3 @@
1
1
  module PragmaticTokenizer
2
- VERSION = "3.0.4".freeze
2
+ VERSION = "3.0.5".freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pragmatic_tokenizer
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.4
4
+ version: 3.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-03-02 00:00:00.000000000 Z
11
+ date: 2017-09-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: unicode
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
169
  version: '0'
170
170
  requirements: []
171
171
  rubyforge_project:
172
- rubygems_version: 2.4.1
172
+ rubygems_version: 2.6.12
173
173
  signing_key:
174
174
  specification_version: 4
175
175
  summary: A multilingual tokenizer