opener-language-identifier 4.2.1 → 4.2.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 6af4d0fee28d0e16f135fe41164c82e6d88d7d93
4
- data.tar.gz: 402e61f6065d5ad5dc039f4cf6184d2524b15ec5
3
+ metadata.gz: 0b0ad863a41e9866efa8852bf2c7580503e2ff7c
4
+ data.tar.gz: f83c2953ff093e72ac460f70a1a250c5350edf72
5
5
  SHA512:
6
- metadata.gz: ea1156117b93f3f7848dfb744899823f9ca051ea98baaaec312c589a4ca194abfe675edb5a19b49620db5ea6ab833a11d4785406904f938220e5d05f0751bb96
7
- data.tar.gz: 4d1a208d8378cfdea94990fd4ce964633848a7aaabda4c1ea8f6c4948b7142daba74abbd11dc8437cc614f5397a35b18cd8b82b70fc2a5c9d061f8d9eaca1bc2
6
+ metadata.gz: 7559934086f7c1b0e669b8bdcd0706a8724ad007bb01563641da7a365563f9d8a879fce06061bdb20fe20ada8c7a327f9823c12a9b5f40b2654db458766cf330
7
+ data.tar.gz: cd97178ed250c759ced83a122cf3f4792f2efd3edd50738fa571b788f38d7ac4630f00296e7abc070136898cdc89a3d6d6ccc2797636785dfdd428df8f1aa984
@@ -82,6 +82,12 @@ module Opener
82
82
  #
83
83
  def detect(input)
84
84
  return new_detector(input).detect
85
+
86
+ # The core Java code raise an exception when it can't detect a language.
87
+ # Since this isn't actually something fatal we'll capture this and return
88
+ # "unknown" instead.
89
+ rescue com.cybozu.labs.langdetect.LangDetectException
90
+ return 'unknown'
85
91
  end
86
92
 
87
93
  ##
@@ -1,5 +1,5 @@
1
1
  module Opener
2
2
  class LanguageIdentifier
3
- VERSION = '4.2.1'
3
+ VERSION = '4.2.2'
4
4
  end
5
5
  end
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.2.1
4
+ version: 4.2.2
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: 2015-01-28 00:00:00.000000000 Z
11
+ date: 2015-02-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: opener-daemons