more aggressive extracting
This commit is contained in:
parent
121ed94fe6
commit
f0be1697f9
1 changed files with 1 additions and 1 deletions
|
@ -7,7 +7,7 @@ MIN_8S = 5
|
||||||
def expand(set)
|
def expand(set)
|
||||||
cased = set + set.map(&:downcase) + set.map(&:upcase)
|
cased = set + set.map(&:downcase) + set.map(&:upcase)
|
||||||
spaced = cased + cased.map { _1.gsub(/\s/, ' ') } + cased.map { _1.gsub(/\s/, "\n") } + cased.flat_map do |amulet|
|
spaced = cased + cased.map { _1.gsub(/\s/, ' ') } + cased.map { _1.gsub(/\s/, "\n") } + cased.flat_map do |amulet|
|
||||||
20.times.map { amulet.gsub(/\s/) { rand(2).zero? ? ' ' : "\n" } }
|
100.times.map { amulet.gsub(/\s/) { rand(2).zero? ? ' ' : "\n" } }
|
||||||
end
|
end
|
||||||
spaced + spaced.flat_map { _1.match?(/[.?!]$/) ? [_1.gsub('.', '?'), _1.gsub('?', '.')] : ["#{_1}.", "#{_1}?"] }
|
spaced + spaced.flat_map { _1.match?(/[.?!]$/) ? [_1.gsub('.', '?'), _1.gsub('?', '.')] : ["#{_1}.", "#{_1}?"] }
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in a new issue