google_translate_diff 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +0 -2
- data/google_translate_diff.gemspec +2 -1
- data/lib/google_translate_diff/tokenizer.rb +4 -2
- data/lib/google_translate_diff/version.rb +1 -1
- metadata +6 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc4b2582b8e854e4fcb52e03a56d67cc17c81a80
|
4
|
+
data.tar.gz: d2b05372dba01af35a3cea4c11e169ada41de9c5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d906d9899926ca75b60eafb5000d1b351cb00bddd416b3e6dbaf37d6a58885295a6f89655f9ad75bdfc60944749db6627de1211cc0728cd1cd9240b53e992179
|
7
|
+
data.tar.gz: 3e56349941f80eb9e482ba29825c6a7571fd78a0c3c636f2ad88b80230bfcb9f837c5e839fb0a1fd2026c69ab0fe12a1e971d6f13d6cc4cd8763596872f30f8a
|
data/README.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# coding: utf-8
|
2
|
+
|
2
3
|
lib = File.expand_path("../lib", __FILE__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
5
|
require "google_translate_diff/version"
|
@@ -43,7 +44,7 @@ between revisions of long texts.
|
|
43
44
|
spec.add_development_dependency "simplecov"
|
44
45
|
|
45
46
|
spec.add_dependency "google-cloud-translate"
|
46
|
-
spec.add_dependency "ox"
|
47
|
+
spec.add_dependency "ox", "< 2.5"
|
47
48
|
spec.add_dependency "dry-initializer"
|
48
49
|
spec.add_dependency "punkt-segmenter"
|
49
50
|
end
|
@@ -65,7 +65,9 @@ class GoogleTranslateDiff::Tokenizer < ::Ox::Sax
|
|
65
65
|
def tokenize(value)
|
66
66
|
return [] if value.nil?
|
67
67
|
tokenizer = new(value).tap do |h|
|
68
|
-
Ox.default_options = {
|
68
|
+
# Ox.default_options = {
|
69
|
+
# mode: :generic, effort: :tolerant, smart: true
|
70
|
+
# }
|
69
71
|
Ox.sax_parse(h, StringIO.new(value))
|
70
72
|
h.cut_last_token
|
71
73
|
end
|
@@ -73,5 +75,5 @@ class GoogleTranslateDiff::Tokenizer < ::Ox::Sax
|
|
73
75
|
end
|
74
76
|
end
|
75
77
|
|
76
|
-
SKIP = %i
|
78
|
+
SKIP = %i[script style].freeze
|
77
79
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: google_translate_diff
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Victor Sokolov
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-05-
|
11
|
+
date: 2017-05-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -112,16 +112,16 @@ dependencies:
|
|
112
112
|
name: ox
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- - "
|
115
|
+
- - "<"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '2.5'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- - "
|
122
|
+
- - "<"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '2.5'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
126
|
name: dry-initializer
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|