classiphier 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.gitignore +2 -3
- data/.travis.yml +9 -3
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +0 -2
- data/LICENSE.txt +1 -1
- data/README.md +29 -7
- data/Rakefile +3 -2
- data/bin/console +4 -4
- data/bin/setup +2 -1
- data/classiphier.gemspec +13 -8
- data/lib/classiphier/version.rb +1 -1
- metadata +32 -15
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 7ee6db3309d06d3d0eb14a5bbf2a4f4fd00c77ce34324155e572821abdbea962
|
4
|
+
data.tar.gz: 1a0579c5fd859e7b6f067a95a3574faf3b89b0c7f0de2628d0bd4fb8bb9b51cd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 812e15e78ac10e054bb12e4811bf9d5e34e5346adeb7ed006d6dcdf5e99b5dafdde3b850cf97a7366fbe2721e4ee496166acf3c5f3645d20d835bdb2866cc4fa
|
7
|
+
data.tar.gz: a3ac3aad9bffd0b1ecc4ccac7f86d33d7630a00e0568c2b5a047a081b142c850ca747e725f2382d2ddb5ebe7172bd6dd4292338cf24dcde8555083bc1a63c39b
|
data/.gitignore
CHANGED
data/.travis.yml
CHANGED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at alejandrodevs@gmail.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
CHANGED
data/LICENSE.txt
CHANGED
data/README.md
CHANGED
@@ -1,23 +1,27 @@
|
|
1
1
|
# Classiphier
|
2
|
-
[![Build Status](https://travis-ci.
|
2
|
+
[![Build Status](https://travis-ci.com/alejandrodevs/classiphier.svg?branch=master)](https://travis-ci.org/alejandrodevs/classiphier)
|
3
3
|
|
4
4
|
Classifier module using Bayesian's theorem.
|
5
|
-
|
6
5
|
*This is another implementation based on cardmagic/classifier.*
|
7
6
|
|
8
|
-
|
9
|
-
|
10
7
|
## Installation
|
11
|
-
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
12
10
|
|
13
11
|
```ruby
|
14
12
|
gem 'classiphier'
|
15
13
|
```
|
16
|
-
Run the bundle command to install it.
|
17
14
|
|
15
|
+
And then execute:
|
18
16
|
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install classiphier
|
22
|
+
|
23
|
+
## Usage
|
19
24
|
|
20
|
-
## Getting started
|
21
25
|
```ruby
|
22
26
|
require 'classiphier'
|
23
27
|
|
@@ -29,3 +33,21 @@ classifier.train :negative, 'Here are some bad words, I hate you'
|
|
29
33
|
|
30
34
|
classifier.classify 'I like these tweets' # => :positive
|
31
35
|
```
|
36
|
+
|
37
|
+
## Development
|
38
|
+
|
39
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
40
|
+
|
41
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
42
|
+
|
43
|
+
## Contributing
|
44
|
+
|
45
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/alejandrodevs/classiphier. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
46
|
+
|
47
|
+
## License
|
48
|
+
|
49
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
50
|
+
|
51
|
+
## Code of Conduct
|
52
|
+
|
53
|
+
Everyone interacting in the Classiphier project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/alejandrodevs/classiphier/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
CHANGED
@@ -1,9 +1,10 @@
|
|
1
1
|
require 'bundler/gem_tasks'
|
2
2
|
require 'rake/testtask'
|
3
3
|
|
4
|
-
Rake::TestTask.new do |t|
|
4
|
+
Rake::TestTask.new(:test) do |t|
|
5
5
|
t.libs << 'test'
|
6
|
-
t.
|
6
|
+
t.libs << 'lib'
|
7
|
+
t.test_files = FileList['test/**/*_test.rb']
|
7
8
|
end
|
8
9
|
|
9
10
|
task default: :test
|
data/bin/console
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require "bundler/setup"
|
4
|
+
require "classiphier"
|
5
5
|
|
6
6
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
7
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -10,5 +10,5 @@ require 'classiphier'
|
|
10
10
|
# require "pry"
|
11
11
|
# Pry.start
|
12
12
|
|
13
|
-
require
|
14
|
-
IRB.start
|
13
|
+
require "irb"
|
14
|
+
IRB.start(__FILE__)
|
data/bin/setup
CHANGED
data/classiphier.gemspec
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require 'classiphier/version'
|
5
4
|
|
@@ -8,21 +7,27 @@ Gem::Specification.new do |spec|
|
|
8
7
|
spec.version = Classiphier::VERSION
|
9
8
|
spec.authors = ['Alejandro Gutiérrez']
|
10
9
|
spec.email = ['alejandrodevs@gmail.com']
|
11
|
-
|
12
10
|
spec.summary = "Classifier module using Bayesian's theorem."
|
13
11
|
spec.description = "Classifier module using Bayesian's theorem."
|
14
12
|
spec.homepage = 'https://github.com/alejandrodevs/classiphier'
|
15
13
|
spec.license = 'MIT'
|
16
14
|
|
17
|
-
spec.
|
15
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
16
|
+
spec.metadata['source_code_uri'] = spec.homepage
|
17
|
+
spec.metadata['changelog_uri'] = "#{spec.homepage}/blob/master/LICENSE.txt"
|
18
|
+
|
19
|
+
# Specify which files should be added to the gem when it is released.
|
20
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
21
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
22
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
23
|
+
end
|
18
24
|
spec.bindir = 'exe'
|
19
25
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
26
|
spec.require_paths = ['lib']
|
21
27
|
|
22
|
-
spec.
|
28
|
+
spec.add_development_dependency 'rake', '~> 12.0'
|
29
|
+
spec.add_development_dependency 'bundler', '~> 2.0'
|
30
|
+
spec.add_development_dependency 'minitest', '~> 5.0'
|
23
31
|
|
24
32
|
spec.add_dependency 'fast-stemmer', '~> 1.0'
|
25
|
-
|
26
|
-
spec.add_development_dependency 'rake', '~> 11.1'
|
27
|
-
spec.add_development_dependency 'minitest', '~> 5.8'
|
28
33
|
end
|
data/lib/classiphier/version.rb
CHANGED
metadata
CHANGED
@@ -1,57 +1,71 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: classiphier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alejandro Gutiérrez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-08-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
14
|
+
name: rake
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
20
|
-
type: :
|
19
|
+
version: '12.0'
|
20
|
+
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '
|
26
|
+
version: '12.0'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: bundler
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '2.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '2.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '5.
|
47
|
+
version: '5.0'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '5.
|
54
|
+
version: '5.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: fast-stemmer
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.0'
|
62
|
+
type: :runtime
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.0'
|
55
69
|
description: Classifier module using Bayesian's theorem.
|
56
70
|
email:
|
57
71
|
- alejandrodevs@gmail.com
|
@@ -61,6 +75,7 @@ extra_rdoc_files: []
|
|
61
75
|
files:
|
62
76
|
- ".gitignore"
|
63
77
|
- ".travis.yml"
|
78
|
+
- CODE_OF_CONDUCT.md
|
64
79
|
- Gemfile
|
65
80
|
- LICENSE.txt
|
66
81
|
- README.md
|
@@ -76,7 +91,10 @@ files:
|
|
76
91
|
homepage: https://github.com/alejandrodevs/classiphier
|
77
92
|
licenses:
|
78
93
|
- MIT
|
79
|
-
metadata:
|
94
|
+
metadata:
|
95
|
+
homepage_uri: https://github.com/alejandrodevs/classiphier
|
96
|
+
source_code_uri: https://github.com/alejandrodevs/classiphier
|
97
|
+
changelog_uri: https://github.com/alejandrodevs/classiphier/blob/master/LICENSE.txt
|
80
98
|
post_install_message:
|
81
99
|
rdoc_options: []
|
82
100
|
require_paths:
|
@@ -85,15 +103,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
85
103
|
requirements:
|
86
104
|
- - ">="
|
87
105
|
- !ruby/object:Gem::Version
|
88
|
-
version:
|
106
|
+
version: '0'
|
89
107
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
90
108
|
requirements:
|
91
109
|
- - ">="
|
92
110
|
- !ruby/object:Gem::Version
|
93
111
|
version: '0'
|
94
112
|
requirements: []
|
95
|
-
|
96
|
-
rubygems_version: 2.5.1
|
113
|
+
rubygems_version: 3.0.6
|
97
114
|
signing_key:
|
98
115
|
specification_version: 4
|
99
116
|
summary: Classifier module using Bayesian's theorem.
|