GithubHelp home page GithubHelp logo

hoshinodis / rhymer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from suzuki86/rhymer

0.0 2.0 0.0 14 KB

与えられた文章の中から韻を踏んでいるフレーズの組み合わせを見つけ出すライブラリです。

License: MIT License

Ruby 98.90% Shell 1.10%

rhymer's Introduction

Rhymer

与えられた文章の中から韻を踏んでいるフレーズの組み合わせを見つけ出すライブラリです。

Installation

リポジトリをクローンします。

git clone https://github.com/suzuki86/rhymer.git

クローンしたディレクトリに移動します。

cd rhymer

必要なgemをインストールします。

bundle install

Gemをビルドします。

gem build rhymer.gemspec

インストールします。

gem install rhymer-x.x.x.gem

Dependencies

nattoが利用できる必要があります。

Usage

Rhymer::Parser.newの引数に文章を渡すと、検査結果が含まれたインスタンスが生成されます。インスタンスのrhymesメソッドを実行すると、韻を踏んでいるフレーズの組み合わせの配列が返されます。

require "rhymer"

rhymer = Rhymer::Parser.new("今日はとても良い天気ですね。こんな日は自然に元気になります。")
rhymer.rhymes.each do |rhyme|
  puts [rhyme[0], rhyme[1]].join(" ")
end

上記のコードを実行すると下記の結果が出力されます。

今日は良い天気 こんな日は自然に元気

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/suzuki86/rhymer.

License

The gem is available as open source under the terms of the MIT License.

rhymer's People

Contributors

suzuki86 avatar emsk avatar juanitofatas avatar rochefort avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.