tbx_importer 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tbx_importer/version.rb +1 -1
- data/lib/tbx_importer.rb +3 -3
- 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: c469af5b3f54de5b9961d24c9752cc8a90ca8ad8
|
4
|
+
data.tar.gz: 18d3b82a9b22f27d2505634ca7e634ca8b6ab915
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 587924fed3b310a6f330341ceb44b7dc2ca394d9405d0afb2c550d9d8616be414a81faf08ad672cf61c900627b0632c204adcafc1e28c7fd8e64de256d72739c
|
7
|
+
data.tar.gz: 0088bc07c50c094e82a921ccdd429e2810d90e61f7bf29a44f4bbeb32e30cc31e43f0679cb7b60ada91358bb452f412e7f6de796756793a1c302da3b120d4360
|
data/lib/tbx_importer/version.rb
CHANGED
data/lib/tbx_importer.rb
CHANGED
@@ -121,11 +121,11 @@ module TbxImporter
|
|
121
121
|
when [116, 101, 114, 109] #term
|
122
122
|
write_term(reader)
|
123
123
|
when [116, 101, 114, 109, 78, 111, 116, 101] #termNote
|
124
|
-
@doc[:term][:part_of_speech] = PrettyStrings::Cleaner.new(reader.read_string.downcase).pretty.gsub("\\","\").gsub("'",%q(\\\'))
|
124
|
+
@doc[:term][:part_of_speech] = PrettyStrings::Cleaner.new(reader.read_string.downcase).pretty.gsub("/", '').gsub("\\","\").gsub("'",%q(\\\')) if reader.get_attribute("type").eql?("partOfSpeech")
|
125
125
|
@doc[:term][:vals].pop
|
126
126
|
write_term(reader)
|
127
127
|
when [100, 101, 115, 99, 114, 105, 112] #descrip
|
128
|
-
@doc[:tc][:definition] = PrettyStrings::Cleaner.new(reader.read_string).pretty.gsub("\\","\").gsub("'",%q(\\\'))
|
128
|
+
@doc[:tc][:definition] = PrettyStrings::Cleaner.new(reader.read_string).pretty.gsub("/", '').gsub("\\","\").gsub("'",%q(\\\')) if reader.get_attribute("type").eql?("definition")
|
129
129
|
@doc[:tc][:vals].pop
|
130
130
|
write_tc
|
131
131
|
end
|
@@ -138,7 +138,7 @@ module TbxImporter
|
|
138
138
|
|
139
139
|
def write_term(reader)
|
140
140
|
return if reader.read_string.nil?
|
141
|
-
text = PrettyStrings::Cleaner.new(reader.read_string).pretty.gsub("\\","\").gsub("'",%q(\\\'))
|
141
|
+
text = PrettyStrings::Cleaner.new(reader.read_string).pretty.gsub("/", '').gsub("\\","\").gsub("'",%q(\\\'))
|
142
142
|
word_count = text.gsub("\s+", ' ').split(' ').length
|
143
143
|
@doc[:term][:vals] << [@doc[:tc][:id], @doc[:term][:lang], @doc[:term][:part_of_speech], text]
|
144
144
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tbx_importer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kevin S. Dias
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-03-
|
11
|
+
date: 2016-03-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|