examples/get_started/morphology.rb in ruby-spacy-0.1.4.1 vs examples/get_started/morphology.rb in ruby-spacy-0.1.5.0

- old
+ new

@@ -1,11 +1,13 @@ +# frozen_string_literal: true + require "ruby-spacy" require "terminal-table" nlp = Spacy::Language.new("en_core_web_sm") doc = nlp.read("Apple is looking at buying U.K. startup for $1 billion") -headings = ["text", "shape", "is_alpha", "is_stop", "morphology"] +headings = %w[text shape is_alpha is_stop morphology] rows = [] doc.each do |token| morph = token.morphology.map do |k, v| "#{k} = #{v}"