🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
DemoInstallSign in
Socket

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.

1.1.0
latest
Source
npm
Version published
Weekly downloads
8
166.67%
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

japanese

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