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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 80eebdd9bee2972c7c88e8e5698222498ce8e69b
4
- data.tar.gz: 7c62680e27b16d9ecca9d14b930db9fcc95983d2
3
+ metadata.gz: 6b2c039fa603b5722197562c44cde289424e877e
4
+ data.tar.gz: 92f687a1052ed1443b6bc202b9623bef30d27557
5
5
  SHA512:
6
- metadata.gz: 23e56108e60c8b6b955274797537b95269378dcbea52b50ca8a2fecc99db7d87fdd1c1dac869460b3d4bf019d1c7bba41dec1133f02121aa7c87aa3224343b8b
7
- data.tar.gz: 5ddbee1787f2f9063254e809d80d0764767d98716e614e096cdb1ce4878a55a445e0cdb407faec7dcc451465c88d71eba3b5f03ffc0d3778cae96b1842c1a146
6
+ metadata.gz: 51f5956bbdf2d908201fb5f3e5935a754dfbac8efe4b17384f36b175d027f75afb5e64080f1595b7eab0a27cee2fcbae92eacf6ac0fbba5f8229200a37b8c5b1
7
+ data.tar.gz: 17763b63ec26cf11654f07600d02f8ee755f6d0a0bf19b9d02dc4d0ffd37a4a28dd2a9792830aac08a01ce1cd518d9f6ec526be120c1a7531629283378b63e31
@@ -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
- reader = Nokogiri::XML::Reader(input)
78
+ document = Nokogiri::XML(input)
79
+ language = document.xpath('KAF/@xml:lang')[0]
79
80
 
80
- return reader.read.lang
81
+ return language ? language.to_s : nil
81
82
  end
82
83
  end # Coreference
83
84
  end # Opener
@@ -1,5 +1,5 @@
1
1
  module Opener
2
2
  class Coreference
3
- VERSION = '2.0.0'
3
+ VERSION = '2.0.1'
4
4
  end
5
5
  end
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.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-25 00:00:00.000000000 Z
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