New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

classify-poetry

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

classify-poetry

recognize type poetry in a given text excerpt

  • 2.0.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
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

Package last updated on 15 Nov 2022

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc