opener-coreference 2.0.0 → 2.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/opener/coreference.rb +4 -3
- data/lib/opener/coreference/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: 6b2c039fa603b5722197562c44cde289424e877e
|
4
|
+
data.tar.gz: 92f687a1052ed1443b6bc202b9623bef30d27557
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 51f5956bbdf2d908201fb5f3e5935a754dfbac8efe4b17384f36b175d027f75afb5e64080f1595b7eab0a27cee2fcbae92eacf6ac0fbba5f8229200a37b8c5b1
|
7
|
+
data.tar.gz: 17763b63ec26cf11654f07600d02f8ee755f6d0a0bf19b9d02dc4d0ffd37a4a28dd2a9792830aac08a01ce1cd518d9f6ec526be120c1a7531629283378b63e31
|
data/lib/opener/coreference.rb
CHANGED
@@ -39,7 +39,7 @@ module Opener
|
|
39
39
|
language = language_from_kaf(input)
|
40
40
|
args = options[:args].dup
|
41
41
|
|
42
|
-
if language_constant_defined?(language)
|
42
|
+
if language and language_constant_defined?(language)
|
43
43
|
kernel = language.new(:args => args)
|
44
44
|
else
|
45
45
|
kernel = Coreferences::Base.new(:args => args, :language => language)
|
@@ -75,9 +75,10 @@ module Opener
|
|
75
75
|
# @return [String]
|
76
76
|
#
|
77
77
|
def language_from_kaf(input)
|
78
|
-
|
78
|
+
document = Nokogiri::XML(input)
|
79
|
+
language = document.xpath('KAF/@xml:lang')[0]
|
79
80
|
|
80
|
-
return
|
81
|
+
return language ? language.to_s : nil
|
81
82
|
end
|
82
83
|
end # Coreference
|
83
84
|
end # Opener
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: opener-coreference
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
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: 2014-
|
11
|
+
date: 2014-12-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: opener-coreference-base
|