srx-languagetool 0.3.0 → 0.6.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: 8848393929f09be9f3141298d9fb3f1a33953e5e2253397105a11004c83c53e1
4
+ data.tar.gz: a21b9fed14c49f2f9da50dbadbe89a5cd00224b827539d9cb6674d77482c5f87
5
5
  SHA512:
6
- metadata.gz: d960af93ad5200cbe3201c22094ddf09f999b05e6a89b69079c47ff1e6c07a927977bd17fc28c8ec0cd7b7da46d4b0119fde7415268ea2c51374a01ae239a62f
7
- data.tar.gz: b37d5e1ba0bc5fc789005250be57de3e4aa4036416e91dd10b787472bd69775cfe0090de5a2d9bb25fe402e2cc69078319ef0f6042e4311cbb7ddfb8eab217bd
6
+ metadata.gz: 8562133261975230c8fff7f4ef08a7ef31b505cf819080a296b83934176880200677400f6bd1c93ac75e033f4e64af4a0d803810adfd68d06e2d990560b5f520
7
+ data.tar.gz: b5c97d8b925d425f6832fa5de77f6c98c6cbb483545219da5ee9f9905095bea9e53eda225140e10f409af87a1bd9e2c8bfccaaa08b80c88e048818e19a3ffe29
@@ -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.5
14
14
  - name: Install
15
15
  run: |
16
- gem install bundler -v 2.2.20
16
+ gem install bundler -v 2.3.10
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.5
data/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  ## [Unreleased]
2
2
 
3
+ ## [0.6.0] - 2022-3-30
4
+
5
+ - Update rules to LanguageTool 5.7
6
+
7
+ ## [0.5.0] - 2021-12-31
8
+
9
+ - Update rules to LanguageTool 5.6
10
+
11
+ ## [0.4.0] - 2021-10-03
12
+
13
+ - Update rules to LanguageTool 5.5
14
+ - Document `_one` and `_two` language suffixes (see README)
15
+
16
+ ## [0.3.0] - 2021-06-26
17
+
3
18
  - Update rules to LanguageTool 5.4
4
19
 
5
20
  ## [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.6.0)
5
5
  srx (< 1.0)
6
6
 
7
7
  GEM
@@ -9,45 +9,45 @@ GEM
9
9
  specs:
10
10
  ast (2.4.2)
11
11
  backport (1.2.0)
12
- benchmark (0.1.1)
12
+ benchmark (0.2.0)
13
13
  byebug (11.1.3)
14
- diff-lcs (1.4.4)
14
+ diff-lcs (1.5.0)
15
15
  e2mmap (0.1.0)
16
16
  jaro_winkler (1.5.4)
17
- kramdown (2.3.1)
17
+ kramdown (2.3.2)
18
18
  rexml
19
19
  kramdown-parser-gfm (1.1.0)
20
20
  kramdown (~> 2.0)
21
- minitest (5.14.4)
22
- nokogiri (1.11.7-x86_64-darwin)
21
+ minitest (5.15.0)
22
+ nokogiri (1.13.3-x86_64-darwin)
23
23
  racc (~> 1.4)
24
- parallel (1.20.1)
25
- parser (3.0.1.1)
24
+ parallel (1.22.1)
25
+ parser (3.1.1.0)
26
26
  ast (~> 2.4.1)
27
- racc (1.5.2)
28
- rainbow (3.0.0)
29
- rake (13.0.3)
30
- regexp_parser (2.1.1)
31
- reverse_markdown (2.0.0)
27
+ racc (1.6.0)
28
+ rainbow (3.1.1)
29
+ rake (13.0.6)
30
+ regexp_parser (2.2.1)
31
+ reverse_markdown (2.1.1)
32
32
  nokogiri
33
33
  rexml (3.2.5)
34
- rspec-expectations (3.10.1)
34
+ rspec-expectations (3.11.0)
35
35
  diff-lcs (>= 1.2.0, < 2.0)
36
- rspec-support (~> 3.10.0)
37
- rspec-support (3.10.2)
38
- rubocop (1.17.0)
36
+ rspec-support (~> 3.11.0)
37
+ rspec-support (3.11.0)
38
+ rubocop (1.26.1)
39
39
  parallel (~> 1.10)
40
- parser (>= 3.0.0.0)
40
+ parser (>= 3.1.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.16.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)
48
- parser (>= 3.0.1.1)
47
+ rubocop-ast (1.16.0)
48
+ parser (>= 3.1.1.0)
49
49
  ruby-progressbar (1.11.0)
50
- solargraph (0.42.3)
50
+ solargraph (0.44.3)
51
51
  backport (~> 1.2)
52
52
  benchmark
53
53
  bundler (>= 1.17.2)
@@ -64,13 +64,16 @@ GEM
64
64
  yard (~> 0.9, >= 0.9.24)
65
65
  srx (0.6.0)
66
66
  nokogiri (~> 1.11)
67
- thor (1.1.0)
67
+ thor (1.2.1)
68
68
  tilt (2.0.10)
69
- unicode-display_width (2.0.0)
70
- yard (0.9.26)
69
+ unicode-display_width (2.1.0)
70
+ webrick (1.7.0)
71
+ yard (0.9.27)
72
+ webrick (~> 1.7.0)
71
73
 
72
74
  PLATFORMS
73
75
  x86_64-darwin-20
76
+ x86_64-darwin-21
74
77
 
75
78
  DEPENDENCIES
76
79
  byebug
@@ -82,4 +85,4 @@ DEPENDENCIES
82
85
  srx-languagetool!
83
86
 
84
87
  BUNDLED WITH
85
- 2.2.20
88
+ 2.3.10
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.6.0'
6
6
  end
7
7
  end