ruby_speech 3.0.0 → 3.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- 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/version.rb +1 -1
- data/ruby_speech.gemspec +1 -3
- metadata +3 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 96deae2344c54438f2f612999f0b2492de80753501a53de1999f68f9eb83ab2a
|
4
|
+
data.tar.gz: 96f18cfbae078b156d40b9dcefd5b1a8e169899760116a08ea5e5b549e2c1353
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4525211ca8ef6c50358366a4c76d53322401bdfd3c1e378012e2bba56f029c62ddba9bbe01d78eaa3721268497a251d222bce35a045bde0f02c72ea6ff7fc10e
|
7
|
+
data.tar.gz: f68220d2a3b3ed14114beaffbdea5591ef0026c36a86e025d4de6c3871f1eaa797244226b917cd85057592601368427c96f2bd2ec72f42ccfefa485300c90c79
|
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
|
}
|
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: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Langfeld
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-02-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -37,9 +37,6 @@ dependencies:
|
|
37
37
|
- - ">="
|
38
38
|
- !ruby/object:Gem::Version
|
39
39
|
version: 3.0.7
|
40
|
-
- - "<"
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: 5.0.0
|
43
40
|
type: :runtime
|
44
41
|
prerelease: false
|
45
42
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -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
|
name: bundler
|
55
49
|
requirement: !ruby/object:Gem::Requirement
|
@@ -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.7.3
|
348
|
+
rubygems_version: 3.2.31
|
356
349
|
signing_key:
|
357
350
|
specification_version: 4
|
358
351
|
summary: A Ruby library for TTS & ASR document preparation
|