demystify 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/demystify/version.rb +1 -1
- data/lib/demystify.rb +1 -1
- 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: f866b0db80a39f4ffa18d4b3a7c7b883a0652441
|
4
|
+
data.tar.gz: 533a739dae1f5b6d8f6993f42fc00f61a35d9913
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b30370b6689c4e43b6afcaf91c98cbca58e4736314887cc289b3f6c237f83308166e9470172be7dcd170a2a81987d8f3211d450c574f9b6e543c9ce57b87490a
|
7
|
+
data.tar.gz: c1e1adba246288c5e4bdace424b3a8bf9588819567d2d3ff2670074b6a7c290474fdb91a89ee2c562a56428c033bffbd3cf6beebc089b193dc1a10ae3928bcf0
|
data/lib/demystify/version.rb
CHANGED
data/lib/demystify.rb
CHANGED
@@ -138,7 +138,7 @@ module Demystify
|
|
138
138
|
@forwards_probability_hash = Hash.new { |h, k| h[k] = [] }
|
139
139
|
@backwards_probability_hash = Hash.new { |h, k| h[k] = [] }
|
140
140
|
@sentences.each do |sentence|
|
141
|
-
sentence_array = sentence.split(
|
141
|
+
sentence_array = sentence.split(/[^[[:word:]]]+/)
|
142
142
|
sentence_array.each_with_index do |word, i|
|
143
143
|
unless i == sentence_array.length - 1
|
144
144
|
@forwards_probability_hash[word] << sentence_array[i+1]
|