google_translate_diff 1.0.7 → 1.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/google_translate_diff/tokenizer.rb +2 -1
- data/lib/google_translate_diff/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8761fef8e3824178915b5b960589d8cdeeafbf71
|
4
|
+
data.tar.gz: 4838baa06669d3d301defb6bce893e33fa9a3eec
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3ff86b2bdcd522aafc078d5963a6cfee52479f802059c75407fecbbabb22f0ebf9b2636a53dcf5cc2d68e88b3a266d9a2ee508a4c56f8c1470a91b5d98fdc62c
|
7
|
+
data.tar.gz: 1335fa3af8f242771609e2d5d96365a033c971c3a1c3ea85b3fb0d44ec83abc62f8763b3b440acf2a89b549620494c68e782c570f48d3ec3532e9273dcec8561
|
@@ -51,7 +51,7 @@ class GoogleTranslateDiff::Tokenizer < ::Ox::Sax
|
|
51
51
|
|
52
52
|
# rubocop: disable Metrics/MethodLength
|
53
53
|
def sentences(value)
|
54
|
-
return [] if value.empty?
|
54
|
+
return [] if value.strip.empty?
|
55
55
|
|
56
56
|
boundaries =
|
57
57
|
Punkt::SentenceTokenizer
|
@@ -96,6 +96,7 @@ class GoogleTranslateDiff::Tokenizer < ::Ox::Sax
|
|
96
96
|
tokenizer = new(value).tap do |h|
|
97
97
|
Ox.sax_parse(h, StringIO.new(value), HTML_OPTIONS)
|
98
98
|
end
|
99
|
+
puts tokenizer.tokens.inspect
|
99
100
|
tokenizer.tokens
|
100
101
|
end
|
101
102
|
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.8
|
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-
|
11
|
+
date: 2017-09-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|