Socket
Socket
Sign inDemoInstall

classify-poetry

Package Overview
Dependencies
5
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    classify-poetry

recognize type poetry in a given text excerpt


Version published
Weekly downloads
7
decreased by-50%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

classify-poetry

NPM Version Build status

recognize the type of poetry in a given excerpt

Installation

This package is ESM only: Node 14+ is needed to use it and it must be imported instead of required.

npm install classify-poetry

Usage

Classify Poetry

import { classifyPoetry } from "classify-poetry";
const types = classifyPoetry(
  "detect a haiku \n pleased to do, says algorithm \n thanks algorithm"
);
console.log(types); // ["haiku"]

Detect Specific Type

ABC
import { abc } from "classify-poetry";
abc(sampleText); // => true or false

http://www.poeticterminology.net/01-abc-poem.htm

Couplet
import { couplet } from "classify-poetry";
couplet(sampleText); // => true or false

https://en.wikipedia.org/wiki/Couplet

Haiku
import { haiku } from "classify-poetry";
haiku(sampleText); // => true or false

https://en.wikipedia.org/wiki/Haiku_in_English

Limerick
import { limerick } from "classify-poetry";
limerick(sampleText); // => true or false

https://en.wikipedia.org/wiki/Limerick_(poetry)

Quatrain
import { quatrain } from "classify-poetry";
quatrain(sampleText); // => true or false

https://en.wikipedia.org/wiki/Quatrain

Sonnet
import { sonnet } from "classify-poetry";
sonnet(sampleText); // => true or false

https://en.wikipedia.org/wiki/Sonnet

Tanka
import { tanka } from "classify-poetry";
tanka(sampleText); // => true or false

https://en.wikipedia.org/wiki/Tanka

Terza Rima
import { terzaRima } from "classify-poetry";
terzaRima(sampleText); // => true or false

https://en.wikipedia.org/wiki/Terza_rima

Keywords

FAQs

Last updated on 15 Nov 2022

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc