japanesestats

package module
v0.0.0-...-85a5f81 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 17, 2022 License: MIT Imports: 2 Imported by: 0

README

Japanesestats

A Go library to gather information about the difficulty of japanese text.

For detailed Documentation see https://pkg.go.dev/github.com/TomRomeo/japanesestats

Add to your project

go install github.com/TomRomeo/japanesestats

Documentation

Overview

The jōyō kanji (常用漢字, regular-use kanji) are 2,136 characters

consisting of all the Kyōiku kanji, plus 1,110 additional kanji taught in junior high and high school.

In publishing, characters outside this category are often given furigana

The list has been taken from https://en.wikipedia.org/wiki/List_of_j%C5%8Dy%C5%8D_kanji

The kyōiku kanji (教育漢字, lit. "education kanji") are the 1,026 first kanji characters that Japanese children learn in elementary school, from first grade to sixth grade

The list has been taken from https://en.wikipedia.org/wiki/Ky%C5%8Diku_kanji

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BelongsToG1

func BelongsToG1(character rune) bool

BelongsToG1 returns true if the given rune is part of the grade 1 list of the kyoiku kanjis

func BelongsToG2

func BelongsToG2(character rune) bool

BelongsToG2 returns true if the given rune is part of the grade 2 list of the kyoiku kanjis

func BelongsToG3

func BelongsToG3(character rune) bool

BelongsToG3 returns true if the given rune is part of the grade 3 list of the kyoiku kanjis

func BelongsToG4

func BelongsToG4(character rune) bool

BelongsToG4 returns true if the given rune is part of the grade 4 list of the kyoiku kanjis

func BelongsToG5

func BelongsToG5(character rune) bool

BelongsToG5 returns true if the given rune is part of the grade 4 list of the kyoiku kanjis

func BelongsToG6

func BelongsToG6(character rune) bool

BelongsToG6 returns true if the given rune is part of the grade 4 list of the kyoiku kanjis

func BelongsToJoyo

func BelongsToJoyo(rune rune) bool

BelongsToJoyo returns true if the given rune is a jōyō kanji

func BelongsToKyoiku

func BelongsToKyoiku(character rune) bool

BelongsToKyoiku returns true if the given rune is part of the kyoiku kanji list

func BelongsToKyujitai

func BelongsToKyujitai(rune rune) bool

BelongsToKyujitai returns true if the given rune is a Kyūjitai kanji These are the traditional writings of kanji

func BelongsToNames

func BelongsToNames(character rune) bool

BelongsToNames returns true if the given rune is part of the name and prefecture list of the kyoiku kanjis

func BelongsToShinjitai

func BelongsToShinjitai(rune rune) bool

BelongsToShinjitai returns true if the given rune is a Shinjitai kanji These are the new, simplified writings of kanji

func G1

func G1(text string) int

G1 returns count of kyōiku kanji learned in grade 1 inside text

func G1Ratio

func G1Ratio(text string) float64

G1Ratio returns percentage of kyōiku kanji learned in grade 1 inside text result is between 0 and 1

func G2

func G2(text string) int

G2 returns count of kyōiku kanji learned in grade 2 inside text

func G2Ratio

func G2Ratio(text string) float64

G2Ratio returns percentage of kyōiku kanji learned in grade 2 inside text result is between 0 and 1

func G3

func G3(text string) int

G3 returns count of kyōiku kanji learned in grade 3 inside text

func G3Ratio

func G3Ratio(text string) float64

G3Ratio returns percentage of kyōiku kanji learned in grade 3 inside text result is between 0 and 1

func G4

func G4(text string) int

G4 returns count of kyōiku kanji learned in grade 4 inside text

func G4Ratio

func G4Ratio(text string) float64

G4Ratio returns percentage of kyōiku kanji learned in grade 4 inside text result is between 0 and 1

func G5

func G5(text string) int

G5 returns count of kyōiku kanji learned in grade 5 inside text

func G5Ratio

func G5Ratio(text string) float64

G5Ratio returns percentage of kyōiku kanji learned in grade 5 inside text result is between 0 and 1

func G6

func G6(text string) int

G6 returns count of kyōiku kanji learned in grade 6 inside text

func G6Ratio

func G6Ratio(text string) float64

G6Ratio returns percentage of kyōiku kanji learned in grade 6 inside text result is between 0 and 1

func Joyo

func Joyo(text string) int

Joyo returns count of jōyō kanji inside text

func JoyoRatio

func JoyoRatio(text string) float64

JoyoRatio returns percentage of jōyō kanji inside text result is between 0 and 1

func Kyoiku

func Kyoiku(text string) int

Kyoiku returns count of kyōiku kanji inside text

func KyoikuRatio

func KyoikuRatio(text string) float64

KyoikuRatio returns percentage of kyoiku characters inside of text result is between 0 and 1

Types

This section is empty.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL