Sha256: 4d5af37a567e200b5008ae2ca2dfee3701c7c0680bc1d364dc87e515515befbd
Contents?: true
Size: 303 Bytes
Versions: 6
Compression:
Stored size: 303 Bytes
Contents
require "ruby-spacy" nlp = Spacy::Language.new("en_core_web_sm") sentence = "Autonomous cars shift insurance liability toward manufacturers" doc = nlp.read(sentence) dep_svg = doc.displacy(style: "dep", compact: false) File.open(File.join("test_dep.svg"), "w") do |file| file.write(dep_svg) end
Version data entries
6 entries across 6 versions & 1 rubygems