ridic 0.6.1 → 0.6.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/README.md +18 -11
  2. data/lib/ridic/version.rb +1 -1
  3. data/lib/ridic.rb +1 -1
  4. metadata +2 -2
data/README.md CHANGED
@@ -24,17 +24,24 @@ Or install it yourself as:
24
24
 
25
25
  API Methods :
26
26
 
27
- * RiDic.word_match("word")
28
- * Returns categories if word is an exact match
29
- * RiDic.stem_match("word")
30
- * Returns categories if word is a match for a provided stem
31
- * RiDic.all_categories_in_document("document text")
32
- * Returns a list of all categories matching all words in a given body of text
33
- * RiDic.category_in_document("document text", category_number)
34
- * Returns a list of a specific category hierarchy contained in a given body of text
35
- * RiDic.category_distribution("document text", category_number)
36
- * Returns the occurrence of each specified category (within a hierarchy) contained in a body of text
37
-
27
+ RiDic.word_match("string")
28
+ Returns categories if word is an exact match
29
+
30
+ RiDic.stem_match("string")
31
+ Returns categories if word is a match for a provided stem
32
+
33
+ RiDic.all_categories_in_document("multi word string")
34
+ Returns a list of all categories matching all words in a given body of text
35
+
36
+ RiDic.category_in_document("multi word string", category_number_fixnum)
37
+ Returns a list of a specific category hierarchy contained in a given body of text
38
+
39
+ RiDic.category_distribution("multi word string", category_number_fixnum)
40
+ Returns the occurrence of each specified category (within a hierarchy) contained in a body of text
41
+
42
+ category_number refers to the “column”, or category hierarchy. In the case of “ALE”, categories 1, 2 and 3 would be ORALITY, NEED and PRIMARY respectively.
43
+
44
+ "ALE" => ["ORALITY","NEED","PRIMARY"]
38
45
 
39
46
  ## Contributing
40
47
 
data/lib/ridic/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module RiDic
2
- VERSION = "0.6.1"
2
+ VERSION = "0.6.2"
3
3
  end
data/lib/ridic.rb CHANGED
@@ -25,7 +25,7 @@ module RiDic
25
25
  result.delete_if {|i| i == [""]}
26
26
  end
27
27
 
28
- def self.category_distribution(document_text, category_number, result = Hash.new(0))
28
+ def self.category_distribution(document_text, category_number = 1, result = Hash.new(0))
29
29
  first_categories = category_in_document(sanitize(document_text), category_number).delete_if {|i| i == nil}
30
30
  first_categories.each {|elem| result[elem.first] += 1}
31
31
  sort_distribution(result)
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ridic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-12-19 00:00:00.000000000 Z
12
+ date: 2012-12-28 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Ruby gem wrapper for the Regressive Imagery Dictionary
15
15
  email: