apiverve_spellchecker 1.2.3 → 1.2.5

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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 074a54c947760ca1cb9bc167a28bcd811951a663859dd73e64e73251a41bb52f
4
- data.tar.gz: 3cd50895857a3ab2bc2987a820556e784ab175bfbe4b073553c9d311aaea17a2
3
+ metadata.gz: 295e400c7aba5b051fe10e9e9e9aaae5dcd1d4ba8131d50cb1e2d3d5bf8a7939
4
+ data.tar.gz: dd25228e1a1d39e9751bf82c9f2876422e961707670d6aac60c0908d3fffa4da
5
5
  SHA512:
6
- metadata.gz: 28c365ffe1454f21c379a75887977e4cc2a8a8a5c8d757768302ac959f5b6eae1134dd800e21bee71d0f96c1c917aa2dfc0566fa637a3da783936619934725a5
7
- data.tar.gz: be594cd5272f6eb42045b39d11778fd3356d057ba02576ed2866b104feb8c2de47b02afefbe54a9c9247d441650d59e2c40f486d74dd28263550a85ce4737feb
6
+ metadata.gz: a9f34d6ad2006e76e8bfd74797557264914a5925f52394046c54aadbf8d3128de1c72b888be4f9eaefe4378eb2f54c33aa1e26765b090f003fa2ee3100729c9d
7
+ data.tar.gz: dfa1d88d630f82f81e98efd28473746c3df268344b47c6b1677aca125240eb6da7aaaef71feb70fb5f8074056ea20d1ee628ecd19a051281672ad0b8c0fe86f6
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # Spell Checker API - Ruby Gem
2
2
 
3
- Spell Checker flags misspelled words in submitted English text and generates correction suggestions. It counts total spelling errors and lists possible replacements for each mistaken word.
3
+ Spell Checker flags misspelled words in submitted English text and generates correction suggestions. It counts total spelling errors, lists possible replacements for each mistaken word, and can return the text with the top suggestions applied, plus on paid plans the character offsets of every misspelling.
4
4
 
5
5
  ## Installation
6
6
 
@@ -35,7 +35,11 @@ require 'apiverve_spellchecker'
35
35
  client = APIVerve::Spellchecker::Client.new(api_key: "YOUR_API_KEY")
36
36
 
37
37
  # Make a request
38
- response = client.execute({ text: "I neeed to call my friend on telephine today!" })
38
+ response = client.execute({
39
+ text: "I neeed to call my friend on telephine today!",
40
+ autocorrect: true,
41
+ offsets: true
42
+ })
39
43
 
40
44
  # Print the response
41
45
  puts response
@@ -46,7 +50,7 @@ puts response
46
50
 
47
51
  ```ruby
48
52
  begin
49
- response = client.execute({ text: "I neeed to call my friend on telephine today!" })
53
+ response = client.execute({ text: "I neeed to call my friend on telephine today!", autocorrect: true, offsets: true })
50
54
  puts response["data"]
51
55
  rescue APIVerve::Spellchecker::ValidationError => e
52
56
  puts "Validation error: #{e.errors.join(', ')}"
@@ -75,6 +79,7 @@ client = APIVerve::Spellchecker::Client.new(
75
79
  "data": {
76
80
  "spellPass": false,
77
81
  "mispellingsFound": 2,
82
+ "totalOccurrences": 2,
78
83
  "corrections": [
79
84
  {
80
85
  "word": "neeed",
@@ -84,6 +89,13 @@ client = APIVerve::Spellchecker::Client.new(
84
89
  "needy",
85
90
  "Neel",
86
91
  "needs"
92
+ ],
93
+ "occurrences": 1,
94
+ "offsets": [
95
+ {
96
+ "start": 2,
97
+ "end": 7
98
+ }
87
99
  ]
88
100
  },
89
101
  {
@@ -94,9 +106,17 @@ client = APIVerve::Spellchecker::Client.new(
94
106
  "telephoner",
95
107
  "telephones",
96
108
  "telephony"
109
+ ],
110
+ "occurrences": 1,
111
+ "offsets": [
112
+ {
113
+ "start": 29,
114
+ "end": 38
115
+ }
97
116
  ]
98
117
  }
99
- ]
118
+ ],
119
+ "correctedText": "I needed to call my friend on telephone today!"
100
120
  }
101
121
  }
102
122
  ```
@@ -10,7 +10,7 @@ module APIVerve
10
10
  #
11
11
  # @example Basic usage
12
12
  # client = APIVerve::Spellchecker::Client.new(api_key: "your_api_key")
13
- # response = client.execute({ text: "I neeed to call my friend on telephine today!" })
13
+ # response = client.execute({ text: "I neeed to call my friend on telephine today!", autocorrect: true, offsets: true })
14
14
  # puts response
15
15
  #
16
16
  # @see https://apiverve.com/marketplace/spellchecker?utm_source=ruby&utm_medium=referral&utm_content=readme
@@ -19,7 +19,7 @@ module APIVerve
19
19
  DEFAULT_TIMEOUT = 30
20
20
 
21
21
  # Validation rules for parameters
22
- VALIDATION_RULES = { 'text' => { type: 'string', required: true, max_length: 50000 } }
22
+ VALIDATION_RULES = { 'text' => { type: 'string', required: true, max_length: 50000 }, 'autocorrect' => { type: 'boolean', required: false }, 'offsets' => { type: 'boolean', required: false } }
23
23
 
24
24
  # Format validation patterns
25
25
  FORMAT_PATTERNS = {
@@ -4,6 +4,6 @@ require_relative "apiverve_spellchecker/client"
4
4
 
5
5
  module APIVerve
6
6
  module Spellchecker
7
- VERSION = "1.2.3"
7
+ VERSION = "1.2.5"
8
8
  end
9
9
  end
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apiverve_spellchecker
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.3
4
+ version: 1.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - APIVerve
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2026-10-26 00:00:00.000000000 Z
10
+ date: 1980-01-02 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: faraday
@@ -59,8 +58,9 @@ dependencies:
59
58
  - !ruby/object:Gem::Version
60
59
  version: '2.0'
61
60
  description: Spell Checker flags misspelled words in submitted English text and generates
62
- correction suggestions. It counts total spelling errors and lists possible replacements
63
- for each mistaken word.
61
+ correction suggestions. It counts total spelling errors, lists possible replacements
62
+ for each mistaken word, and can return the text with the top suggestions applied,
63
+ plus on paid plans the character offsets of every misspelling.
64
64
  email:
65
65
  - hello@apiverve.com
66
66
  executables: []
@@ -79,7 +79,6 @@ metadata:
79
79
  source_code_uri: https://github.com/apiverve/spellchecker-API/tree/main/ruby
80
80
  changelog_uri: https://apiverve.com/changelog
81
81
  documentation_uri: https://docs.apiverve.com/ref/spellchecker
82
- post_install_message:
83
82
  rdoc_options: []
84
83
  require_paths:
85
84
  - lib
@@ -94,8 +93,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
94
93
  - !ruby/object:Gem::Version
95
94
  version: '0'
96
95
  requirements: []
97
- rubygems_version: 3.0.3.1
98
- signing_key:
96
+ rubygems_version: 4.0.23
99
97
  specification_version: 4
100
98
  summary: Spell Checker API - Ruby Client
101
99
  test_files: []