ruby_speech 3.0.0-java → 3.0.1-java

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
- SHA1:
3
- metadata.gz: 5f2aff4db248db9b8fec86dd5ea27ae2e72e5ec4
4
- data.tar.gz: 999704524d12548dd20a7b69876efb3acee7d14a
2
+ SHA256:
3
+ metadata.gz: bf0ce7a02ac2402dc159a5888b4d1fdbcc670cc78a34a25bbd666257a3fc40c0
4
+ data.tar.gz: a81459d60d6d3af6cbcf18fbcad2e12b9c54a23270da08342036635c3e527b28
5
5
  SHA512:
6
- metadata.gz: 63f599c402e25a20d38ac94675c2ae36dff9e235277c2f1c32033d2269129c7569e6a99e2e0eb3db1c7cd7cfb49efd1c3cb4a18b2f46e67aad88487bfc86ebb5
7
- data.tar.gz: 6c5f2e970ba8658c2102fbe6fa9de41fd1062c1d2498d8a2e5f23ab1bbfea9012f13f245974c08c2ae552630c76c6d5617555da30df88a956d0153f078eabd97
6
+ metadata.gz: 42b2d1512761f1f0d8ea24ec610a8bb04a7e4af7440fc80faf981a088518fbd60944146859f8c4538971b9b63dad81a646f7e29d2cb53f18ec3a4a2bf29a54f0
7
+ data.tar.gz: f6efa7172c52f12d59f5979b400500d02d79036ec13896e4593d6913da24407420b3c7949bc06f07cbe947ec525eb2a7ea9d78387941259b932afe97710c0a26
data/.travis.yml CHANGED
@@ -1,26 +1,33 @@
1
+ dist: xenial
1
2
  language: ruby
2
3
  rvm:
3
4
  - 2.1.10
4
5
  - 2.2.10
5
- - 2.3.7
6
- - 2.4.4
6
+ - 2.3.8
7
+ - 2.4.5
8
+ - 2.5.3
9
+ - 2.6.3
7
10
  - jruby-9.1.17.0
8
11
  - jruby-head
9
- - rbx-3
10
12
  - ruby-head
11
13
  jdk:
12
14
  - openjdk8 # for jruby
13
15
  matrix:
16
+ include:
17
+ - rvm: rbx-4
18
+ dist: trusty
19
+ name: Rubinius
14
20
  allow_failures:
15
- - rvm: rbx-3
21
+ - name: Rubinius
16
22
  - rvm: ruby-head
17
- sudo: false
18
23
  addons:
19
24
  apt:
20
25
  packages:
21
26
  - libpcre3
22
27
  - libpcre3-dev
23
- before_install:
24
- - gem install bundler
28
+ env:
29
+ global:
30
+ - JRUBY_OPTS='--debug'
31
+ before_install: rvm list
25
32
  notifications:
26
33
  irc: "irc.freenode.org#adhearsion"
data/CHANGELOG.md CHANGED
@@ -1,4 +1,6 @@
1
- # [develop](https://github.com/benlangfeld/ruby_speech)
1
+ # [3.0.1](https://github.com/benlangfeld/ruby_speech/compare/v3.0.0...v3.0.1) - [2022-02-15](https://rubygems.org/gems/ruby_speech/versions/3.0.1)
2
+ * Misc: Relax dependency limits to allow newer ActiveSupport versions and thus Ruby 3.0
3
+ * Bugfix: Misc performance improvements
2
4
 
3
5
  # [3.0.0](https://github.com/benlangfeld/ruby_speech/compare/v2.4.0...v3.0.0) - [2018-07-10](https://rubygems.org/gems/ruby_speech/versions/3.0.0)
4
6
  * Feature: Loosen and bump Nokogiri version to ~>1.8, >=1.8.3
data/README.md CHANGED
@@ -1,8 +1,7 @@
1
- [![Gem Version](https://badge.fury.io/rb/ruby_speech.png)](https://rubygems.org/gems/ruby_speech)
2
- [![Build Status](https://secure.travis-ci.org/adhearsion/ruby_speech.png?branch=develop)](http://travis-ci.org/adhearsion/ruby_speech)
3
- [![Dependency Status](https://gemnasium.com/adhearsion/ruby_speech.png?travis)](https://gemnasium.com/adhearsion/ruby_speech)
4
- [![Code Climate](https://codeclimate.com/github/adhearsion/ruby_speech.png)](https://codeclimate.com/github/adhearsion/ruby_speech)
5
- [![Coverage Status](https://coveralls.io/repos/adhearsion/ruby_speech/badge.png?branch=develop)](https://coveralls.io/r/adhearsion/ruby_speech)
1
+ [![Gem Version](https://badge.fury.io/rb/ruby_speech.svg)](https://rubygems.org/gems/ruby_speech)
2
+ [![Build Status](https://secure.travis-ci.org/adhearsion/ruby_speech.svg?branch=develop)](http://travis-ci.org/adhearsion/ruby_speech)
3
+ [![Code Climate](https://codeclimate.com/github/adhearsion/ruby_speech.svg)](https://codeclimate.com/github/adhearsion/ruby_speech)
4
+ [![Coverage Status](https://coveralls.io/repos/adhearsion/ruby_speech/badge.svg?branch=develop)](https://coveralls.io/r/adhearsion/ruby_speech)
6
5
 
7
6
  # RubySpeech
8
7
  RubySpeech is a library for constructing and parsing Text to Speech (TTS) and Automatic Speech Recognition (ASR) documents such as [SSML](http://www.w3.org/TR/speech-synthesis), [GRXML](http://www.w3.org/TR/speech-grammar/) and [NLSML](http://www.w3.org/TR/nl-spec/). Such documents can be constructed to be processed by TTS and ASR engines, parsed as the result from such, or used in the implementation of such engines.
@@ -6,6 +6,7 @@ import org.jruby.RubyModule;
6
6
  import org.jruby.RubyObject;
7
7
  import org.jruby.anno.JRubyClass;
8
8
  import org.jruby.anno.JRubyMethod;
9
+ import org.jruby.runtime.Block;
9
10
  import org.jruby.runtime.ObjectAllocator;
10
11
  import org.jruby.runtime.ThreadContext;
11
12
  import org.jruby.runtime.Visibility;
@@ -43,22 +44,26 @@ public class RubySpeechGRXMLMatcher extends RubyObject {
43
44
  }
44
45
  return callMethod(context, "match_for_buffer", buffer);
45
46
  } else if (m.hitEnd()) {
46
- RubyModule potential_match = runtime.getClassFromPath("RubySpeech::GRXML::PotentialMatch");
47
- return potential_match.callMethod(context, "new");
47
+ return getGRXMLType(runtime, "PotentialMatch").newInstance(context, Block.NULL_BLOCK);
48
48
  }
49
- RubyModule nomatch = runtime.getClassFromPath("RubySpeech::GRXML::NoMatch");
50
- return nomatch.callMethod(context, "new");
49
+ return getGRXMLType(runtime, "NoMatch").newInstance(context, Block.NULL_BLOCK);
51
50
  }
52
51
 
53
- public Boolean is_max_match(String buffer)
54
- {
55
- String search_set = "0123456789#*ABCD";
56
- for (int i = 0; i < 16; i++) {
57
- String new_buffer = buffer + search_set.charAt(i);
58
- Matcher m = p.matcher(new_buffer);
59
- if (m.matches()) return false;
52
+ private boolean is_max_match(String buffer) {
53
+ final int len = buffer.length();
54
+ StringBuilder new_buffer = new StringBuilder(len + 1);
55
+ new_buffer.append(buffer).append('\0');
56
+ final String search_set = "0123456789#*ABCD";
57
+ for (int i = 0; i < search_set.length(); i++) {
58
+ new_buffer.setCharAt(len, search_set.charAt(i));
59
+ if (p.matcher(new_buffer).matches()) return false;
60
60
  }
61
61
  return true;
62
62
  }
63
63
 
64
+ private static RubyClass getGRXMLType(final Ruby runtime, final String name) {
65
+ RubyModule grxml = (RubyModule) runtime.getModule("RubySpeech").getConstantAt("GRXML");
66
+ return (RubyClass) grxml.getConstantAt(name);
67
+ }
68
+
64
69
  }
@@ -90,7 +90,7 @@ module RubySpeech
90
90
  # ```
91
91
  #
92
92
  def match(buffer)
93
- find_match buffer.dup
93
+ find_match buffer
94
94
  end
95
95
 
96
96
  private
Binary file
@@ -1,3 +1,3 @@
1
1
  module RubySpeech
2
- VERSION = "3.0.0"
2
+ VERSION = "3.0.1"
3
3
  end
data/ruby_speech.gemspec CHANGED
@@ -13,8 +13,6 @@ Gem::Specification.new do |s|
13
13
 
14
14
  s.license = 'MIT'
15
15
 
16
- s.rubyforge_project = "ruby_speech"
17
-
18
16
  s.files = `git ls-files`.split("\n")
19
17
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
20
18
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
@@ -28,7 +26,7 @@ Gem::Specification.new do |s|
28
26
  end
29
27
 
30
28
  s.add_runtime_dependency %q<nokogiri>, ["~> 1.8", ">= 1.8.3"]
31
- s.add_runtime_dependency %q<activesupport>, [">= 3.0.7", "< 5.0.0"]
29
+ s.add_runtime_dependency %q<activesupport>, [">= 3.0.7"]
32
30
 
33
31
  s.add_development_dependency %q<bundler>, [">= 1.0.0"]
34
32
  s.add_development_dependency %q<rspec>, ["~> 3.0"]
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby_speech
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: java
6
6
  authors:
7
7
  - Ben Langfeld
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-07-11 00:00:00.000000000 Z
11
+ date: 2022-02-21 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  requirement: !ruby/object:Gem::Requirement
@@ -36,9 +36,6 @@ dependencies:
36
36
  - - ">="
37
37
  - !ruby/object:Gem::Version
38
38
  version: 3.0.7
39
- - - "<"
40
- - !ruby/object:Gem::Version
41
- version: 5.0.0
42
39
  name: activesupport
43
40
  prerelease: false
44
41
  type: :runtime
@@ -47,9 +44,6 @@ dependencies:
47
44
  - - ">="
48
45
  - !ruby/object:Gem::Version
49
46
  version: 3.0.7
50
- - - "<"
51
- - !ruby/object:Gem::Version
52
- version: 5.0.0
53
47
  - !ruby/object:Gem::Dependency
54
48
  requirement: !ruby/object:Gem::Requirement
55
49
  requirements:
@@ -351,8 +345,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
351
345
  - !ruby/object:Gem::Version
352
346
  version: '0'
353
347
  requirements: []
354
- rubyforge_project: ruby_speech
355
- rubygems_version: 2.6.14.1
348
+ rubygems_version: 3.2.29
356
349
  signing_key:
357
350
  specification_version: 4
358
351
  summary: A Ruby library for TTS & ASR document preparation