Git Product home page Git Product logo

reimemonster's Introduction

Reimemonster

Build Status Coverage Status

This repository contains helpers for making poems. For example it counts syllables and helps you find rhyming words.

Currently only usable in German. See it in action on the Reimemonster demonstration page. It saves your last poem to the localstorage, lets you search for rhymes by selecting a word and shows the amount of syllables in the lines on the side.

Usage

You can either use the API or use the npm commands from the command line.

API usage

First, install the module via npm.

npm install reimemonster

findRhyme

findRhyme(word: string): string[]

findRhyme will present you a list of Strings that may rhyme on your word by checking their ending. For example, findRhyme("anleiern") results in a list like this:

[
  "Aasgeiern",
  "Abschiedsfeiern",
  "Abschlussfeiern",
  "Befreiern",
  "Brautschleiern",
  ...
]

countSyllables

countSyllables(text: string): integer

This will count the number of syllables in a text by using a custom splitter with regular expressions. There are some words for which this approach does not work, because they can be split up in several ways. For example "Millionen" could be divided as "Mil-li-o-nen" or "Mil-lio-nen", depending on how you would pronounce it.

Command line usage

You can use the command line tools by cloning this repository and run the npm commands.

To count syllables in verses, you can use this command for example:

pnpm run start

To get out of this mode, press CTRL+D.

To find a rhyming word, use this command:

pnpm run rhyme <your-word>

Acknowledgements

reimemonster's People

Contributors

mchunkytrunk avatar narigo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

reimemonster's Issues

Weitere Reimmöglichkeiten / priorisierte Auflistung der Vorschläge

"Mett" liefert "Himmelbett" oder "Schachbrett" als Vorschläge - beides könnte gut passen. "Zwiebelmett" liefert keinen Vorschlag, wobei "Himmelbett" auch hier gut passen würde. Schachbrett hingegen klingt nicht ganz so toll, aber das liegt eher an dem Reimschema / Betonung und Silbenanzahl.

Es wäre sinnvoll, zunächst wie bisher Vorschläge zu machen, dann aber auf die letzte Silbe wert zu legen. Die silbenmäßig gleich langen Worte sollten zuerst kommen, danach andere Längen.

Die Vorschläge könnten auch dahingehend verbessert werden, dass sie sich an der Länge der letzten Zeile orientieren (wie viel Platz habe ich noch), möglicherweise würde ein Wort genau hinein passen.

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.