Socket
Socket
Sign inDemoInstall

jp-verbs

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jp-verbs

Unconjugate conjugated Japanese verbs.


Version published
Weekly downloads
17
decreased by-68.52%
Maintainers
1
Weekly downloads
 
Created
Source

jp-verb-conjugator

This module deconjugates conjugated Japanese verbs using a set of hundreds of rules.

Examples

const Conjugator = require('jp-verbs');

let result = Conjugator.unconjugate('言われてみれば');
console.log(JSON.stringify(result, null, 2));

Results in the following:

[
  {
    "base": "言う",
    "derivationSequence": {
      "derivations": [
        "言う",
        "言われる",
        "言われて",
        "言われてみる",
        "言われてみれば"
      ],
      "wordFormProgression": [
        "Passive Form",
        "て・で Form",
        "みる To Try To Do",
        "ば Conditional Form"
      ]
    },
  }
]

Grammar links (mostly from Tae Kim) are also included for almost all of the word types:

const Conjugator = require('jp-verbs');
const grammarLinks = Conjugator.GrammarLinkForWordType;
const wordType = Conjugator.WordType;

console.log(wordType.TE_FORM);
console.log(grammarLinks[wordType.TE_FORM]);

Results in the following:

て・で Form
http://www.guidetojapanese.org/learn/grammar/compound#Expressing_a_sequence_of_verbs_with_the_te-form

Tests

After installing nyc and mocha globally, run tests with npm test

About

The dictionary of verbs was created from EDICT2

Keywords

FAQs

Package last updated on 10 May 2024

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