NaiveText 0.4.0 → 0.4.1

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: 24121c5efbc4119de814e59e3080b3770c822929
4
- data.tar.gz: 2638006388fe41e21918f6859545efdb5e9f4526
3
+ metadata.gz: c77da3eeff67ccae563debe023d1b7381b270098
4
+ data.tar.gz: 818c857fbb2366d14bc599e2a074eead39d840b7
5
5
  SHA512:
6
- metadata.gz: 18fecd3d98353ed3d8010af35795a7bda536bf48cd072ad9674b807f78d8988e8f2b7babc3f56bd7f2d6f4caee614998450ade5dada44cfef7eb79b746f84c7a
7
- data.tar.gz: c94b0036e3ce3f145ac08beca161ec0d39227ab229938bb5466acbc8f8d0364808f0115dcb6aba162ead52d815da577565681bea71339ef735aa6b6775463f53
6
+ metadata.gz: ebf2a4a647463099cc87d1ce3266765a4fcb2f6a770a604ca5293755851ac43dc938d13bc000f7604ee7892ca9974a36659985f433b5e1c29adf5494d36b1c70
7
+ data.tar.gz: 48f1e633ff228d192dfad74bc8f0c1cb4ada96fdac94a1979ef491d63613ab6b484f30079b2256d5c178b398b1d16b9779231b6ccfa33343b6404b20f7d2ea7f
data/CHANGELOG.md ADDED
@@ -0,0 +1,25 @@
1
+ # Change Log
2
+ All notable changes to this project will be documented in this file.
3
+ This project adheres to [Semantic Versioning](http://semver.org/).
4
+
5
+ ## [Unreleased]
6
+
7
+ ## [0.4.1] - 2015-10-29
8
+ ### Added
9
+ - Changelog :-)
10
+
11
+ ### Changed
12
+ - Updated the description in the gemspec.
13
+ - Updated the Readme
14
+
15
+ ### Removed
16
+ - Removed the need to call to_a manually, when using non-array exmaples in active NaiveText:build (like ActiveRecord:Relations).
17
+
18
+ ## [0.4.0] - 2015-10-18
19
+ ### Added
20
+ - Support of Active Record models as examples
21
+ - Support for new arguments list for NaiveText.build: NaiveText.build uses a keyword argument (catgeories) to accept an categories array of the followin format: [{category: 'name_of_category', examples: array_of_examples}]
22
+
23
+
24
+ [Unreleased]: https://github.com/RicciFlowing/NaiveText/compare/v0.4.0...HEAD
25
+ [0.4.0]: https://github.com/olivierlacan/keep-a-changelog/compare/v0.1.0...v0.4.0
data/NaiveText.gemspec CHANGED
@@ -9,8 +9,8 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ["RicciFlowing"]
10
10
  spec.email = ["benjamin@mathe-sellin.de"]
11
11
 
12
- spec.summary = "A NaiveText text classifier"
13
- spec.description = "Sort texts based on expample texts in predefined categories"
12
+ spec.summary = "A text classifier written in ruby"
13
+ spec.description = "NaiveText is a text classifier gem written in ruby and made to be easily integratable in your Rails app."
14
14
  spec.homepage = "https://github.com/RicciFlowing/NaiveText"
15
15
  spec.licenses = ['MIT']
16
16
 
data/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # NaiveText
2
2
 
3
- A naive Bayes Textclassifier written in Ruby
3
+ NaiveText is a text classifier gem written in ruby and made to be easily integratable in your Rails app.
4
4
 
5
5
  1. What does it do?
6
6
  ----
7
+ Text classifier are used in many areas of IT. The filter spam, predict what a user wants to buy, detect which language a text is written in, ...
7
8
 
8
- It sorts texts into predefined categories (i.e. interesting/boring).
9
- The algorithm bases its decisions on classified trainingdata (text files, ActiveRecord models,...).
9
+ The kind of classifier included in NaiveText, uses existing text examples (junk-makrde e-mails, allready bought products, texts in different languages, ...) to calculate in which category (spam/e-mail, interesting_product/not_interesting_product, ...) a unknown text belongs.
10
10
 
11
11
  ## Installation
12
12
 
@@ -45,8 +45,8 @@ In your system (an rails app of course) you haven a *Post* model with a text att
45
45
  ```ruby
46
46
  require 'NaiveText'
47
47
 
48
- interesting_examples = Post.up_voted.to_a
49
- boring_examples = Post.down_voted.to_a
48
+ interesting_examples = Post.up_voted
49
+ boring_examples = Post.down_voted
50
50
 
51
51
  categories = [{name: 'interesting', examples: interesting_examples},
52
52
  {name: 'boring', examples: boring_examples}];
@@ -61,13 +61,6 @@ Checkout the full example and some more in the
61
61
  [NaiveText-example repo](https://github.com/RicciFlowing/NaiveText-examples).
62
62
  Have fun using it!
63
63
 
64
-
65
- ## Development
66
-
67
- After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
68
-
69
- 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` to create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
70
-
71
64
  ## Contributing
72
65
 
73
66
  1. Fork it ( https://github.com/RicciFlowing/NaiveText/fork )
@@ -1,6 +1,6 @@
1
1
  class ExamplesGroup
2
2
  def initialize(args)
3
- @examples = args[:examples] || []
3
+ @examples = args[:examples].to_a || []
4
4
  load_text
5
5
  split_text_into_words
6
6
  format_words
@@ -1,3 +1,3 @@
1
1
  module NaiveText
2
- VERSION = "0.4.0"
2
+ VERSION = "0.4.1"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: NaiveText
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - RicciFlowing
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-25 00:00:00.000000000 Z
11
+ date: 2015-10-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -80,7 +80,8 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- description: Sort texts based on expample texts in predefined categories
83
+ description: NaiveText is a text classifier gem written in ruby and made to be easily
84
+ integratable in your Rails app.
84
85
  email:
85
86
  - benjamin@mathe-sellin.de
86
87
  executables: []
@@ -90,6 +91,7 @@ files:
90
91
  - ".gitignore"
91
92
  - ".rspec"
92
93
  - ".travis.yml"
94
+ - CHANGELOG.md
93
95
  - Gemfile
94
96
  - Guardfile
95
97
  - License.md
@@ -133,5 +135,5 @@ rubyforge_project:
133
135
  rubygems_version: 2.4.6
134
136
  signing_key:
135
137
  specification_version: 4
136
- summary: A NaiveText text classifier
138
+ summary: A text classifier written in ruby
137
139
  test_files: []