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 +4 -4
- data/lib/txml_importer/version.rb +1 -1
- data/lib/txml_importer.rb +1 -0
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a078751dc91cb07a514191b5f901d759bdadc8b
|
4
|
+
data.tar.gz: d4662e5bd090d0637075bff35adbfd27c8661d42
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e7e53cfe51ea8684b3b403560856caf4ef5045551a98a29f80c983376225d0aab861832c15b2b932cdeb8d256d93b296defa3f282b884d07fbe36429217be797
|
7
|
+
data.tar.gz: 596a1ac81f05b55419e3eef59f7e9b9d9ec47a782cba38489ea02623f03b98290125977925fd908d3caf5920b7e4517ac509d17f95f7df18b8f287b018aca938
|
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]
|