Sha256: 6a5c7ad9005de121ac03a56489bb967d8601b58fc361011edfc772c0b78eb4b7
Contents?: true
Size: 341 Bytes
Versions: 3
Compression:
Stored size: 341 Bytes
Contents
require "ruby-spacy" require "terminal-table" nlp = Spacy::Language.new("ja_core_news_sm") sentence = "自動運転車は保険責任を製造者に転嫁する。" doc = nlp.read(sentence) dep_svg = doc.displacy('dep', false) File.open(File.join(File.dirname(__FILE__), "outputs/test_dep.svg"), "w") do |file| file.write(dep_svg) end
Version data entries
3 entries across 3 versions & 1 rubygems