txml_importer 0.1.1 → 0.2.0

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: 26c5a354544d265329544a26fda8cd5fce86cc16
4
- data.tar.gz: b7df96359e1d8884c95acf0f19af8e75d1be3689
3
+ metadata.gz: 0a078751dc91cb07a514191b5f901d759bdadc8b
4
+ data.tar.gz: d4662e5bd090d0637075bff35adbfd27c8661d42
5
5
  SHA512:
6
- metadata.gz: 38a56c7666dfd240701ff3f57f1d2720e36ccea7f8b4f576fd36bb494f5e10e42b8bcf0f898e0562b79553a47619d1c79bd6db607a42db0af5477904259883be
7
- data.tar.gz: 35f6b414b88228492a77fd2b66586fbb4180ddaced7485e76cb8b075c62af2b09d05a56cfa9d42c8a3b49b7a0c32151d7b959a43771da9e7f3b440f2932b7a20
6
+ metadata.gz: e7e53cfe51ea8684b3b403560856caf4ef5045551a98a29f80c983376225d0aab861832c15b2b932cdeb8d256d93b296defa3f282b884d07fbe36429217be797
7
+ data.tar.gz: 596a1ac81f05b55419e3eef59f7e9b9d9ec47a782cba38489ea02623f03b98290125977925fd908d3caf5920b7e4517ac509d17f95f7df18b8f287b018aca938
@@ -1,3 +1,3 @@
1
1
  module TxmlImporter
2
- VERSION = "0.1.1"
2
+ VERSION = "0.2.0"
3
3
  end
data/lib/txml_importer.rb CHANGED
@@ -113,6 +113,7 @@ module TxmlImporter
113
113
  def write_seg(reader, role)
114
114
  return if reader.read_string.nil?
115
115
  text = PrettyStrings::Cleaner.new(reader.read_string).pretty.gsub("\\","\").gsub("'",%q(\\\'))
116
+ return if text.nil? || text.empty?
116
117
  word_count = text.gsub("\s+", ' ').split(' ').length
117
118
  if role.eql?('source')
118
119
  language = @doc[:source_language]
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: txml_importer
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kevin S. Dias