Universe

ruby-spacy

Wrapper module for using spaCy from Ruby via PyCall

ruby-spacy is a wrapper module for using spaCy from the Ruby programming language via PyCall. This module aims to make it easy and natural for Ruby programmers to use spaCy.

Example

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", "lemma", "pos", "tag", "dep"] rows = [] doc.each do |token| rows << [token.text, token.lemma, token.pos, token.tag, token.dep] end table = Terminal::Table.new rows: rows, headings: headings puts table
View more
Author info

Yoichiro Hasebe

GitHubyohasebe/ruby-spacy

Categories nonpython

Submit your project

If you have a project that you want the spaCy community to make use of, you can suggest it by submitting a pull request to the spaCy website repository. The Universe database is open-source and collected in a simple JSON file. For more details on the formats and available fields, see the documentation. Looking for inspiration your own spaCy plugin or extension? Check out the project idea label on the issue tracker.

Read the docsJSON source