examples/word_sample.rb in sequitur-0.1.23 vs examples/word_sample.rb in sequitur-0.1.24

- old
+ new

@@ -5,20 +5,19 @@ # # Purpose: show how to apply Sequitur on a stream of text words # # Raw input is one String containing repeated sentences... -raw_input = <<-SNIPPET -Error: unknown character '?' at position 6 -Error: illegal character '%' at position 20 -Error: unknown character '/' at position 9 +raw_input = <<~SNIPPET + Error: unknown character '?' at position 6 + Error: illegal character '%' at position 20 + Error: unknown character '/' at position 9 SNIPPET # Convert into a sequence of words input_sequence = raw_input.scan(/\w+/) # Generate the grammar from the sequence grammar = Sequitur.build_from(input_sequence) - # Use a formatter to display the grammar rules on the console output formatter = Sequitur::Formatter::BaseText.new($stdout) # Now render the rules