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 +5 -5
- data/.travis.yml +14 -7
- data/CHANGELOG.md +3 -1
- data/README.md +4 -5
- data/ext/ruby_speech/RubySpeechGRXMLMatcher.java +16 -11
- data/lib/ruby_speech/grxml/matcher.rb +1 -1
- data/lib/ruby_speech/ruby_speech.jar +0 -0
- data/lib/ruby_speech/version.rb +1 -1
- data/ruby_speech.gemspec +1 -3
- metadata +3 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: bf0ce7a02ac2402dc159a5888b4d1fdbcc670cc78a34a25bbd666257a3fc40c0
|
4
|
+
data.tar.gz: a81459d60d6d3af6cbcf18fbcad2e12b9c54a23270da08342036635c3e527b28
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
6
|
-
- 2.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
|
-
-
|
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
|
-
|
24
|
-
|
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
|
-
# [
|
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.
|
2
|
-
[![Build Status](https://secure.travis-ci.org/adhearsion/ruby_speech.
|
3
|
-
[![
|
4
|
-
[![
|
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
|
-
|
47
|
-
return potential_match.callMethod(context, "new");
|
47
|
+
return getGRXMLType(runtime, "PotentialMatch").newInstance(context, Block.NULL_BLOCK);
|
48
48
|
}
|
49
|
-
|
50
|
-
return nomatch.callMethod(context, "new");
|
49
|
+
return getGRXMLType(runtime, "NoMatch").newInstance(context, Block.NULL_BLOCK);
|
51
50
|
}
|
52
51
|
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
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
|
}
|
Binary file
|
data/lib/ruby_speech/version.rb
CHANGED
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"
|
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.
|
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:
|
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
|
-
|
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
|