lexical_units 0.1.1 → 0.1.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +0 -1
- data/lexical_units.gemspec +9 -8
- data/lib/lexical_units/version.rb +1 -1
- data/lib/lexical_units/words.rb +2 -2
- data/spec/lexical_units/words_spec.rb +6 -0
- metadata +15 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9a4bfb92de1943c5efe8f356518903de89c05cc7
|
4
|
+
data.tar.gz: dc8b0f7013c37044c36e3315378150190159e78f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bfd940bca9b83fb114cff3ecf632baafa7cd43efcc527db7b0f7ce8035bc684656a19cc2d2196de635403c0835c89451d800fefbf8a3b7bdda32a02261a08c2a
|
7
|
+
data.tar.gz: 129c53d53a93827c7736f4a1f2b7a5749016110c564eab8f50733c82727480d49de4a5a75ef81f73c942210dcca316aebe83b3e431a84eb25f196941c85ca75b
|
data/Gemfile
CHANGED
data/lexical_units.gemspec
CHANGED
@@ -4,19 +4,20 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
require 'lexical_units/version'
|
5
5
|
|
6
6
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
7
|
+
spec.name = 'lexical_units'
|
8
8
|
spec.version = LexicalUnits::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email =
|
9
|
+
spec.authors = ['Aleksander Malaszkiewicz']
|
10
|
+
spec.email = %w(info@fractalsoft.org)
|
11
11
|
spec.summary = %q{Split text into lexical units}
|
12
|
-
spec.homepage =
|
13
|
-
spec.license =
|
12
|
+
spec.homepage = 'https://github.com/fractalsoft/lexical_units'
|
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 = [
|
18
|
+
spec.require_paths = ['lib']
|
19
19
|
|
20
|
-
spec.add_development_dependency
|
21
|
-
spec.add_development_dependency
|
20
|
+
spec.add_development_dependency 'bundler', '~> 1.3'
|
21
|
+
spec.add_development_dependency 'rake', '>=0'
|
22
|
+
spec.add_development_dependency 'rspec', '~> 3.0.0'
|
22
23
|
end
|
data/lib/lexical_units/words.rb
CHANGED
@@ -15,9 +15,9 @@ module LexicalUnits
|
|
15
15
|
|
16
16
|
def self.separators
|
17
17
|
[
|
18
|
-
'\,', '\:', '\;', '\.', '\?', '\!', '\/',
|
18
|
+
'\,', '\:', '\;', '\.', '\?', '\!', '\/', '\|', '\~',
|
19
19
|
'\(', '\)', '\[', '\]', '\>', '\<', '\{', '\}',
|
20
|
-
|
20
|
+
"\¿", "\¡", '\=', '\"', "\»", "\«", '\@', '\#', '\+', '–', '—'
|
21
21
|
].join
|
22
22
|
end
|
23
23
|
end
|
@@ -129,5 +129,11 @@ describe LexicalUnits do
|
|
129
129
|
|
130
130
|
expect(subject.words(text)).to eq(@array)
|
131
131
|
end
|
132
|
+
|
133
|
+
it 'splite text with long minus (—) into words' do
|
134
|
+
text = %Q(Lorem—ipsum—dolor sit—amet)
|
135
|
+
|
136
|
+
expect(subject.words(text)).to eq(@array)
|
137
|
+
end
|
132
138
|
end
|
133
139
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lexical_units
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Aleksander Malaszkiewicz
|
@@ -38,6 +38,20 @@ dependencies:
|
|
38
38
|
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rspec
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 3.0.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 3.0.0
|
41
55
|
description:
|
42
56
|
email:
|
43
57
|
- info@fractalsoft.org
|