Sha256: 1276b20a02f2b86ee0f75a61b2e7f7043886a89a0883705d403aaf74321ebd08

Contents?: true

Size: 336 Bytes

Versions: 4

Compression:

Stored size: 336 Bytes

Contents

require "ruby-spacy"
require "terminal-table"

nlp = Spacy::Language.new("en_core_web_sm")

doc = nlp.read("Where are you?")

puts "Morph features of the third word: " + doc[2].morph.to_s
puts "POS of the third word: " + doc[2].pos_.to_s

# Morph features of the third word: Case=Nom|Person=2|PronType=Prs
# POS of the third word: PRON

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ruby-spacy-0.1.3 examples/linguistic_features/rule_based_morphology.rb
ruby-spacy-0.1.2 examples/linguistic_features/rule_based_morphology.rb
ruby-spacy-0.1.1 examples/linguistic_features/rule_based_morphology.rb
ruby-spacy-0.1.0 examples/linguistic_features/rule_based_morphology.rb