NaiveText 0.3.1 → 0.3.2

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: a5fb523a17a0c40da0658b22f2f9acf8dc4b3a56
4
- data.tar.gz: a2a2b321c3e598d307860d28942f59de68edebca
3
+ metadata.gz: 8863bd947fbaa7645db1837cb9660a9b1c7e87a2
4
+ data.tar.gz: 7032fbbdabf2b2e752523f22a03df9d2aa6e0d86
5
5
  SHA512:
6
- metadata.gz: 7c7901d130de0a55fbc91da57261b3add2e9695984e79c127e5f7981bb29c16fe90a3187eaaf1d1894458ce37f0c379fec15110bd0749df59ed20e5ccd38f125
7
- data.tar.gz: 29d8e6261e0a9031ca7c0345d3e70050b2fa9530e6a6a827d12cfd167d32af31af6a2418f1991663c39270935cbd31c45436d6c3af3edc37c7a2b07881c3d580
6
+ metadata.gz: cc980eb123bf8a0aa3a1f80c2b0570dc4d48c16cb7dce2f773b2922ecb27430d43faacaa552cca7889ea3df4eb1ea0f4a2708e5dfb11d8aeee6b9c215c0f417e
7
+ data.tar.gz: ca2043c61446fb553bf834bfcbe8c23a0f5cd1da4720a2474d87271c464a6eb43eefd96cfe5e24d071bad33977fb63e4fd023bb4f9523509123b7157acd2c114
data/README.md CHANGED
@@ -5,8 +5,8 @@ A naive Bayes Textclassifier written in Ruby
5
5
  1. What does it do?
6
6
  ----
7
7
 
8
- It sorts text into to categories predefined categories (i.e. interesting/boring).
9
- The Algorithm bases the decisions on given text examples.
8
+ It sorts text into predefined categories (i.e. interesting/boring).
9
+ The algorithm bases its decisions on given text examples.
10
10
 
11
11
  ## Installation
12
12
 
@@ -26,10 +26,7 @@ Or install it yourself as:
26
26
 
27
27
  ## Usage
28
28
 
29
- In brief the process is as follows:
30
-
31
- Create a directory (naming convention: training) containing subdirectories for every category (i.e. 'interesting' and 'boring').
32
- Fill the directories with examples for interesting/boring texts. This will the training material for the algorithm.
29
+ Create a directory for the trainings-data containing subdirectories for every category (i.e. 'interesting' and 'boring'). Fill the directories with examples for interesting/boring texts.
33
30
 
34
31
  Next up, the code:
35
32
 
@@ -3,7 +3,7 @@ class ExamplesGroup
3
3
  @text = load_text(path)
4
4
  @words = @text.split(/\W+/)
5
5
  if @words.length == 0
6
- raise 'Empty Trainingsdata'
6
+ raise 'Empty_Trainingsdata'
7
7
  end
8
8
  end
9
9
 
@@ -46,7 +46,7 @@ class PropabilityCollection
46
46
  result << category.to_s
47
47
  result << ':'
48
48
  result << self.find(category).to_s
49
- result << '\n'
49
+ result << "\n"
50
50
  end
51
51
  result
52
52
  end
@@ -10,7 +10,7 @@ class TextClassifier
10
10
  end
11
11
 
12
12
  def propabilities(text)
13
- @calculator.get_propabilities(text)
13
+ @calculator.get_propabilities_for(text)
14
14
  end
15
15
 
16
16
  private
@@ -1,3 +1,3 @@
1
1
  module NaiveText
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
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.3.1
4
+ version: 0.3.2
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-16 00:00:00.000000000 Z
11
+ date: 2015-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler