npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@kurone-kito/japanese-law-translation

v0.1.4

Published

The unofficial library package provides bilingual English translations of legal terms in Japan.

Downloads

1

Readme

↔️ Japanese Law Translation

The unofficial library provides bilingual English translations of legal terms in Japan.

Pros

  • This library provides dictionaries in JSON format, which is easier to handle than XML or CSV distributed on the official website.
  • Since this library is available via npm, it can be used more quickly than clicking and downloading from the official site.
  • The library also provides definitions of TypeScript.

System Requirements

  • Node.js
    • Hydrogen LTS >=18.20 or
    • Iron LTS >=20.10 or
    • later versions

Usage

npm i @kurone-kito/japanese-law-translation
import { j2e } from '@kurone-kito/japanese-law-translation';
// or
import j2eJson from '@kurone-kito/japanese-law-translation/j2e.json' with { type: 'json' };

console.log(j2e['法律']);
// Output: { kana: 'ほうりつ', translation: [{ phrase: 'law', usage: '法律一般としての意味の場合', ... }, ...], ... }

console.log(j2eJson['法律']);
// Output: { kana: 'ほうりつ', translation: [{ phrase: 'law', usage: '法律一般としての意味の場合', ... }, ...], ... }

API

See documentation for details.

Exposed endpoints

  • @kurone-kito/japanese-law-translation: The main entry point
  • @kurone-kito/japanese-law-translation/e2j.json: The dictionary from English to Japanese
  • @kurone-kito/japanese-law-translation/j2e.json: The dictionary from Japanese to English
  • @kurone-kito/japanese-law-translation/k2e.json: The dictionary from Hiragana to English

e2j: The dictionary from English to Japanese

e2j.json values are provided as is, with type definitions.

import { e2j } from '@kurone-kito/japanese-law-translation';

console.log(e2j['guarantee']);
/*
[
  {
    kana: 'ほしょう',
    word: '保証',
    examples: [
      {
        en: 'there is no guarantee from the requesting country that it will honor requests of the same sort from Japan.',
        ja: '日本国が行う同種の要請に応ずる旨の要請国の保証がないとき。',
        ref: '国際捜査共助等に関する法律第4条第2号'
      }
    ],
    notes: [],
    usage: '(1)民法、(2)国際捜査共助等に関する法律の場合'
  },
  { kana: 'ほしょう', word: '保障', examples: [], notes: [] }
]
*/

j2e: The dictionary from Japanese to English

j2e.json values are provided as is, with type definitions.

import { j2e } from '@kurone-kito/japanese-law-translation';

console.log(j2e['弁償']);
/*
{
  kana: 'べんしょう',
  translations: [
    { examples: [], notes: [], phrase: 'compensation' },
    {
      examples: [
        {
          en: '…also be reimbursed for necessary expenses incurred in performing their duties as specified by Cabinet Order',
          ja: '…及び政令の定めるところによりその職務を行うために要する費用の弁償を受けるものとする',
          ref: '労働組合法第19条の8'
        }
      ],
      notes: ['【動詞】弁償する: reimburse'],
      phrase: 'reimbursement'
    }
  ]
}
*/

k2e: The dictionary from Hiragana to English

k2e.json values are provided as is, with type definitions.

import { k2e } from '@kurone-kito/japanese-law-translation';

console.log(k2e['ほしょう']);
/*
[
  {
    word: '保証',
    translations: [
      {
        examples: [
          {
            en: 'there is no guarantee from the requesting country that it will honor requests of the same sort from Japan.',
            ja: '日本国が行う同種の要請に応ずる旨の要請国の保証がないとき。',
            ref: '国際捜査共助等に関する法律第4条第2号'
          }
        ],
        notes: [],
        phrase: 'guarantee',
        usage: '(1)民法、(2)国際捜査共助等に関する法律の場合'
      }
    ]
  },
  {
    word: '保障',
    translations: [
      {
        examples: [],
        notes: ['【注】制度としての保障の場合。'],
        phrase: 'security',
        usage: '原則'
      },
      { examples: [], notes: [], phrase: 'guarantee' }
    ]
  },
  {
    word: '補償',
    translations: [
      {
        examples: [],
        notes: [
          '【注】用例について「損失の補償」を参照のこと。',
          '【動詞】補償する: compensate'
        ],
        phrase: 'compensation'
      }
    ]
  }
]
*/

See documentation for details.

Contributing

Welcome to contribute to this repository! For more details, please refer to CONTRIBUTING.md.

LICENSE

CC-BY-4.0