shirakaba / pitch-accent

Predict pitch accent in Japanese

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Pitch Accent

A library to predict pitch accent in Japanese.

Usage

For users

Installation:

yarn install pitch-accent

Usage:

import { solve } from "pitch-accent";

solve([
  { surface: 'シン', pos: 'noun', accent: 1 },
  { surface: 'タマネギ', pos: 'noun', accent: 3 },
])
// 5

solve([
  { surface: 'シン', pos: 'noun', accent: 1 },
  { surface: 'ヨコハマ', pos: 'noun', accent: 0 },
]);
// 3

For contributors

# Install deps
yarn install

# Run
yarn start

Legal

pitch-accent is copyrighted free software by Jamie Birch, and is released under any of the BSD, LGPL, or GPL licences (see the files LICENCE-BSD.txt, LICENCE-LGPL.txt, and LICENCE-GPL.txt, respectively).

See sources.md for source data used.

About

Predict pitch accent in Japanese

License:BSD 3-Clause "New" or "Revised" License


Languages

Language:TypeScript 95.3%Language:JavaScript 3.3%Language:Python 1.0%Language:CSS 0.2%Language:HTML 0.1%Language:Shell 0.0%