srx-languagetool 0.3.0 → 0.4.0

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: 9f3ac5da2f53e57018c6febfd004e1a6b2ba5059fc8911aaae52d263ff52dcbd
4
- data.tar.gz: 54e97225366062cc30080346dd69c49b4bef9c86db54b8ff2c08f5e5a7920c69
3
+ metadata.gz: d9732a6a7af3383b587c8aa1d7ebf708672ab774434a937c32eaff144ce483e5
4
+ data.tar.gz: ce6d60a9ef8cc3b47593d677284c559282ff414a8847a729ad44731d5a7cb955
5
5
  SHA512:
6
- metadata.gz: d960af93ad5200cbe3201c22094ddf09f999b05e6a89b69079c47ff1e6c07a927977bd17fc28c8ec0cd7b7da46d4b0119fde7415268ea2c51374a01ae239a62f
7
- data.tar.gz: b37d5e1ba0bc5fc789005250be57de3e4aa4036416e91dd10b787472bd69775cfe0090de5a2d9bb25fe402e2cc69078319ef0f6042e4311cbb7ddfb8eab217bd
6
+ metadata.gz: 6d118bcefc4a53a8b4fe6dc4aa45434b2a389d86a5732939524e3c9847c26ddbeeff654359a7bfd90f11990f689626585942502245a5ac3c8f51f9cf2199950a
7
+ data.tar.gz: ad5a28c0b39bb8910dae5936faf45e53d768cc0e6ff039e2ed33a465ed3cc7fef32347c94fa7a546cf5a1549483b83aa7814649305b1a1409d7756462a5316c1
@@ -10,10 +10,10 @@ jobs:
10
10
  - name: Set up Ruby
11
11
  uses: ruby/setup-ruby@v1
12
12
  with:
13
- ruby-version: 2.7.3
13
+ ruby-version: 2.7.4
14
14
  - name: Install
15
15
  run: |
16
- gem install bundler -v 2.2.20
16
+ gem install bundler -v 2.2.28
17
17
  bundle install
18
18
  - name: Type check
19
19
  run: bundle exec solargraph typecheck --level typed
data/.rubocop_todo.yml CHANGED
@@ -1,6 +1,6 @@
1
1
  # This configuration was generated by
2
2
  # `rubocop --auto-gen-config`
3
- # on 2021-02-13 13:22:37 UTC using RuboCop version 1.9.1.
3
+ # on 2021-10-03 07:48:00 UTC using RuboCop version 1.22.0.
4
4
  # The point is for the user to remove these configuration records
5
5
  # one by one as the offenses are removed from the code base.
6
6
  # Note that changes in the inspected code, or installation of new
@@ -9,7 +9,7 @@
9
9
  # Offense count: 2
10
10
  # Configuration parameters: IgnoredMethods, CountRepeatedAttributes.
11
11
  Metrics/AbcSize:
12
- Max: 65
12
+ Max: 69
13
13
 
14
14
  # Offense count: 5
15
15
  # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
@@ -20,14 +20,15 @@ Metrics/BlockLength:
20
20
  # Offense count: 1
21
21
  # Configuration parameters: CountComments, CountAsOne.
22
22
  Metrics/ClassLength:
23
- Max: 132
23
+ Max: 136
24
24
 
25
25
  # Offense count: 3
26
26
  # Configuration parameters: CountComments, CountAsOne, ExcludedMethods, IgnoredMethods.
27
27
  Metrics/MethodLength:
28
- Max: 67
28
+ Max: 71
29
29
 
30
30
  # Offense count: 1
31
+ # Configuration parameters: AllowedConstants.
31
32
  Style/Documentation:
32
33
  Exclude:
33
34
  - 'spec/**/*'
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.3
1
+ 2.7.4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.4.0] - 2021-10-03
4
+
5
+ - Update rules to LanguageTool 5.5
6
+ - Document `_one` and `_two` language suffixes (see README)
7
+
8
+ ## [0.3.0] - 2021-06-26
9
+
3
10
  - Update rules to LanguageTool 5.4
4
11
 
5
12
  ## [0.2.0] - 2021-04-15
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- srx-languagetool (0.3.0)
4
+ srx-languagetool (0.4.0)
5
5
  srx (< 1.0)
6
6
 
7
7
  GEM
@@ -19,14 +19,14 @@ GEM
19
19
  kramdown-parser-gfm (1.1.0)
20
20
  kramdown (~> 2.0)
21
21
  minitest (5.14.4)
22
- nokogiri (1.11.7-x86_64-darwin)
22
+ nokogiri (1.12.5-x86_64-darwin)
23
23
  racc (~> 1.4)
24
- parallel (1.20.1)
25
- parser (3.0.1.1)
24
+ parallel (1.21.0)
25
+ parser (3.0.2.0)
26
26
  ast (~> 2.4.1)
27
27
  racc (1.5.2)
28
28
  rainbow (3.0.0)
29
- rake (13.0.3)
29
+ rake (13.0.6)
30
30
  regexp_parser (2.1.1)
31
31
  reverse_markdown (2.0.0)
32
32
  nokogiri
@@ -35,19 +35,19 @@ GEM
35
35
  diff-lcs (>= 1.2.0, < 2.0)
36
36
  rspec-support (~> 3.10.0)
37
37
  rspec-support (3.10.2)
38
- rubocop (1.17.0)
38
+ rubocop (1.22.0)
39
39
  parallel (~> 1.10)
40
40
  parser (>= 3.0.0.0)
41
41
  rainbow (>= 2.2.2, < 4.0)
42
42
  regexp_parser (>= 1.8, < 3.0)
43
43
  rexml
44
- rubocop-ast (>= 1.7.0, < 2.0)
44
+ rubocop-ast (>= 1.12.0, < 2.0)
45
45
  ruby-progressbar (~> 1.7)
46
46
  unicode-display_width (>= 1.4.0, < 3.0)
47
- rubocop-ast (1.7.0)
47
+ rubocop-ast (1.12.0)
48
48
  parser (>= 3.0.1.1)
49
49
  ruby-progressbar (1.11.0)
50
- solargraph (0.42.3)
50
+ solargraph (0.44.0)
51
51
  backport (~> 1.2)
52
52
  benchmark
53
53
  bundler (>= 1.17.2)
@@ -66,7 +66,7 @@ GEM
66
66
  nokogiri (~> 1.11)
67
67
  thor (1.1.0)
68
68
  tilt (2.0.10)
69
- unicode-display_width (2.0.0)
69
+ unicode-display_width (2.1.0)
70
70
  yard (0.9.26)
71
71
 
72
72
  PLATFORMS
@@ -82,4 +82,4 @@ DEPENDENCIES
82
82
  srx-languagetool!
83
83
 
84
84
  BUNDLED WITH
85
- 2.2.20
85
+ 2.2.28
data/README.md CHANGED
@@ -25,7 +25,7 @@ Or install it yourself as:
25
25
 
26
26
  ## Usage
27
27
 
28
- For detailed usage information, please see
28
+ For detailed usage information about the engine, please see
29
29
  [srx-ruby](https://github.com/amake/srx-ruby).
30
30
 
31
31
  ```ruby
@@ -36,6 +36,18 @@ engine = Srx::Engine.new(data)
36
36
  engine.segment('Hi. How are you?', language: 'en') #=> ["Hi.", " How are you?"]
37
37
  ```
38
38
 
39
+ **Note:** To split on single line breaks, append the suffix `_one` to the
40
+ language. To split only on two or more consecutive line breaks, append `_two`.
41
+
42
+ ```ruby
43
+ engine.segment("Hi. \n\n\nHow are you?", language: 'en')
44
+ #=> ["Hi. \n\n\nHow are you?"]
45
+ engine.segment('Hi. \n\n\nHow are you?', language: 'en_one')
46
+ #=> ["Hi. \n", "\n", "\n", "How are you?"]
47
+ engine.segment('Hi. \n\n\nHow are you?', language: 'en_two')
48
+ #=> ["Hi. \n\n\n", "How are you?"]
49
+ ```
50
+
39
51
  ## Development
40
52
 
41
53
  After checking out the repo, run `bin/setup` to install dependencies. Then, run
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Srx
4
4
  module Languagetool
5
- VERSION = '0.3.0'
5
+ VERSION = '0.4.0'
6
6
  end
7
7
  end