opener-language-identifier 4.4.1 → 4.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/core/target/LanguageDetection-1.0.0.jar +0 -0
- data/core/target/classes/com/cybozu/labs/langdetect/DetectorFactory.class +0 -0
- data/lib/opener/language_identifier/backend/detect_language_com.rb +1 -0
- data/lib/opener/language_identifier/cli.rb +4 -3
- data/lib/opener/language_identifier/version.rb +1 -3
- data/lib/opener/language_identifier.rb +4 -4
- data/opener-language-identifier.gemspec +1 -1
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 253d20b891b0a3bc0778889ef762c44f4067e7965b5458b4e8d4117982e6afd8
|
4
|
+
data.tar.gz: 510fe58ee91fedf422f38eafa32acc45aa713948c0ef64aaa0b621bc71458596
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fd740b775cad26b7174293ec68a530c21d012003f6f4a15f82775087bb0daf269e39e7743e1f04bb0d70ca2ff9f23cf5583c27cecc8ab537c3550059b94bf0c6
|
7
|
+
data.tar.gz: 3a91415727e610a98df6263b7fd0ed2f62b7214bc360ce0186527525109a75121c9979693859d3ab86e75d50e76c199e87b62827500fcfb2d1b56154960f252e
|
Binary file
|
Binary file
|
@@ -62,9 +62,10 @@ Example:
|
|
62
62
|
probs: false,
|
63
63
|
)
|
64
64
|
|
65
|
-
|
66
|
-
|
67
|
-
|
65
|
+
params = JSON.parse(ENV['PARAMS']).transform_keys!(&:to_sym) rescue {}
|
66
|
+
input = STDIN.tty? ? nil : STDIN.read
|
67
|
+
output = identifier.run input, params
|
68
|
+
puts output
|
68
69
|
end
|
69
70
|
end
|
70
71
|
end
|
@@ -58,10 +58,10 @@ module Opener
|
|
58
58
|
# @return [Array]
|
59
59
|
#
|
60
60
|
def run input, params = {}
|
61
|
-
|
62
|
-
|
63
|
-
|
64
|
-
|
61
|
+
lang = params[:language] # already provided, skip detection
|
62
|
+
lang ||= @detector.detect input
|
63
|
+
lang = build_kaf input, lang if options[:kaf]
|
64
|
+
lang
|
65
65
|
end
|
66
66
|
|
67
67
|
alias identify run
|
@@ -5,7 +5,7 @@ Gem::Specification.new do |gem|
|
|
5
5
|
gem.version = Opener::LanguageIdentifier::VERSION
|
6
6
|
gem.authors = ['development@olery.com']
|
7
7
|
gem.summary = 'Language identifier for human readable text.'
|
8
|
-
gem.description = gem.summary
|
8
|
+
gem.description = gem.summary
|
9
9
|
gem.homepage = "http://opener-project.github.com/"
|
10
10
|
gem.required_ruby_version = '>= 1.9.2'
|
11
11
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opener-language-identifier
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.4.
|
4
|
+
version: 4.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- development@olery.com
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-09-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: newrelic_rpm
|
@@ -156,7 +156,7 @@ dependencies:
|
|
156
156
|
- - ">="
|
157
157
|
- !ruby/object:Gem::Version
|
158
158
|
version: '0'
|
159
|
-
description:
|
159
|
+
description: Language identifier for human readable text.
|
160
160
|
email:
|
161
161
|
executables:
|
162
162
|
- language-identifier
|
@@ -318,8 +318,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
318
318
|
- !ruby/object:Gem::Version
|
319
319
|
version: '0'
|
320
320
|
requirements: []
|
321
|
-
|
322
|
-
rubygems_version: 2.7.6.2
|
321
|
+
rubygems_version: 3.0.9
|
323
322
|
signing_key:
|
324
323
|
specification_version: 4
|
325
324
|
summary: Language identifier for human readable text.
|