inci_score 4.6.2 → 4.6.3

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
  SHA256:
3
- metadata.gz: 948a01654e32fadaaa2cce158a59e84fc3f904a403d89fabfe18b3529600d0a8
4
- data.tar.gz: 664c64f7dfb9003fcd1fa795d39c59157f1742d1e42653e504e9be2be47c196e
3
+ metadata.gz: fbbf88644bed7f8afcd802d796c2b49a2428a2eac2bbf68761079b83bc485866
4
+ data.tar.gz: 014d402eacfdb5512b350fdb7131dee8ebc793df1091153b30c04e000e47d161
5
5
  SHA512:
6
- metadata.gz: 7429c7077f89e8054782460772db0ed3f95f28a6ce686b2c060c3eceea0fa23e1169072727fca021f9c53a7e8afb55a28f87d7f1e7309292a48511a2fbcf895e
7
- data.tar.gz: ca66118c3e79de310d0031fb2dfa17e91c62e772138798072c4c3eff0566e6e91e51a170c3d1f727511af3470455f1eefe8c064bbfda961cf7086b6c0f19c9dd
6
+ metadata.gz: 44d96ce1e40671e04de3f9120465a129abbbc6bbd104c0e639d78be6d03be52645dedad5f5c22f7ff0c2d02c115fbf32d6941e38d9aa86867f9e4e38763719d3
7
+ data.tar.gz: 4dcfd975146932d346b4ba693621fd00762b83071b6cf91db73757bec4271d530ab253b42a2e647c661d8e37712682e4cef51c9befa0a5b6717232ddc785b77d
data/README.md CHANGED
@@ -31,11 +31,13 @@ The total score is then calculated on a percent basis.
31
31
  Since the ingredients list could come from an unreliable source (e.g. data scanned from a captured image), the gem tries to fuzzy match the ingredients by using different algorithms:
32
32
  * exact matching
33
33
  * [edit distance](https://en.wikipedia.org/wiki/Levenshtein_distance) behind a specified tolerance
34
+ * known hazards (ie ending in `ethicone`)
34
35
  * first relevant matching digits
35
36
  * matching splitted tokens
36
37
 
37
38
  ### Sources
38
- The library accepts the list of ingredients as a single string of text. Since this source could come from an OCR program, the library performs a normalization by stripping invalid characters and removing the unimportant parts.
39
+ The library accepts the list of ingredients as a single string of text.
40
+ Since this source could come from an OCR program, the library performs a normalization by stripping invalid characters and removing the unimportant parts.
39
41
  The ingredients are typically separated by comma, although normalizer will detect the most appropriate separator:
40
42
 
41
43
  ```
@@ -44,6 +46,7 @@ The ingredients are typically separated by comma, although normalizer will detec
44
46
 
45
47
  ## Installation
46
48
  Install the gem from your shell:
49
+
47
50
  ```shell
48
51
  gem install inci_score
49
52
  ```
@@ -61,7 +64,7 @@ inci.score # 56.25
61
64
  inci.precision # 100.0
62
65
  ```
63
66
 
64
- As you see the results are wrapped by an *InciScore::Response* object, this is useful when dealing with the CLI and HTTP interfaces (read below).
67
+ As you see the results are wrapped by an *InciScore::Response* object, this is useful when dealing with the CLI (read below).
65
68
 
66
69
  #### Unrecognized components
67
70
  The API treats unrecognized components as a common case by just marking the object as non valid.
@@ -94,6 +97,7 @@ UNRECOGNIZED:
94
97
 
95
98
  #### Getting help
96
99
  You can get CLI interface help by:
100
+
97
101
  ```shell
98
102
  Usage: inci_score --src="aqua, parfum, etc"
99
103
  -s, --src=SRC The INCI list: "aqua, parfum, etc"
@@ -2,7 +2,7 @@
2
2
 
3
3
  module InciScore
4
4
  class Computer
5
- TOLERANCE = 30.0
5
+ TOLERANCE = 50.0
6
6
  DECIMALS = 2
7
7
 
8
8
  attr_reader :src, :rules, :ingredients, :components, :unrecognized, :precisions
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module InciScore
4
- VERSION = '4.6.2'
4
+ VERSION = '4.6.3'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inci_score
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.6.2
4
+ version: 4.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - costajob
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-01-06 00:00:00.000000000 Z
11
+ date: 2023-01-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: oj