Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/kurone-kito/japanese-law-translation
↔️ The unofficial library provides bilingual English translations of legal terms in Japan; since 2024.7
https://github.com/kurone-kito/japanese-law-translation
dictionary english-dictionary japanese-dictionary json law legal translation typescript-definitions typescript-library words
Last synced: 24 days ago
JSON representation
↔️ The unofficial library provides bilingual English translations of legal terms in Japan; since 2024.7
- Host: GitHub
- URL: https://github.com/kurone-kito/japanese-law-translation
- Owner: kurone-kito
- License: cc-by-4.0
- Created: 2024-07-29T04:04:42.000Z (4 months ago)
- Default Branch: main
- Last Pushed: 2024-09-15T04:53:50.000Z (2 months ago)
- Last Synced: 2024-10-17T01:37:17.647Z (about 1 month ago)
- Topics: dictionary, english-dictionary, japanese-dictionary, json, law, legal, translation, typescript-definitions, typescript-library, words
- Language: TypeScript
- Homepage: https://github.com/kurone-kito/japanese-law-translation/tree/implements-the-project/packages/jlt/docs
- Size: 791 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: .github/CONTRIBUTING.ja.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.ja.md
Awesome Lists containing this project
README
# ↔️ Japanese Law Translation
The unofficial library provides bilingual English translations of legal
terms in Japan.- source:
- see: [My tweet](https://x.com/kurone_kito/status/1817756249112617423)## 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](https://www.npmjs.com), 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
```sh
npm i @kurone-kito/japanese-law-translation
``````ts
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](https://github.com/kurone-kito/japanese-law-translation/blob/main/packages/jlt/docs/README.md).
### 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.
```ts
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.
```ts
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.
```ts
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](https://github.com/kurone-kito/japanese-law-translation/blob/main/packages/jlt/docs/README.md).
## Contributing
Welcome to contribute to this repository! For more details, please refer to
[CONTRIBUTING.md](https://github.com/kurone-kito/japanese-law-translation/blob/main/.github/CONTRIBUTING.md).## LICENSE
[CC-BY-4.0](https://creativecommons.org/licenses/by/4.0/)