MyNixOS website logo
Description

Performs 漢字検定 (Japan Kanji Aptitude Test) level analysis on given Kanji.

nanq can inform the user of a number of statistics regarding Kanji and the Nation Kanji Examination, also known as 漢字検定 or 漢検. In the most simple case, it will reveal what inputed Kanji belong to what Level of the exam.

NANQ

Author: Colin Woodbury [email protected]

NanQ is a Japanese Kanji analysation program written in Haskell. Its main function is to tell what Kanji belong to what Level of the Japanese National Kanji Examination (漢字検定).

NanQ can be used to:

  • determine what Level individual Kanji belong to
  • determine the average Level (difficulty, in other words) of a group of Kanji
  • apply the above to whole files of Japanese

INSTALLING NANQ

First, get the source files from:

https://github.com/fosskers/nanq

NanQ is written in Haskell and uses the stack tool. Once stack is installed, move to the source directory and perform:

stack build
stack install

USAGE

Assuming you've made it so that you can run the executable, the following command-line options are available:

ANALYSIS OPTIONS

ShortLongDescription
-a--averageGiven Japanese input, finds the average Level of all Kanji present
-u--unknownsReports Kanji whose Level could not be determined
-h--helpPrints a message explaining these options
-l--leveldistFind the % distribution of Levels in given Japanese
-s--splitsShow what Level each Kanji belongs to
-d--densityDetermines how much of the input is made up of Kanji
-e--elementaryDetermines how much of the input is made up of Kanji learned in Japanese Elementary School

INPUT SOURCE OPTIONS

ShortLongDescription
nonenoneAnalyse a String of Japanese given from the command line
-f--fileGet input from a given file

NOTES ON CLOs

  • All options above can be mixed to include their analysis result in the output JSON.
  • -h will over-ride any other options or arguments, discarding them and printing a help message.

Examples

Single Kanji

$> nanq -s 日
{
  "levelSplit": {
    "Ten": "日"
  }
}

A Japanese sentence

$> nanq -s これは日本語
{
    "levelSplit": {
      "Nine": "語",
      "Ten": "本日"
    }
}

All options

$> nanq -leadus これは日本語
{
    "levelSplit": {
      "Nine": "語",
      "Ten": "本日"
    },
    "elementary": 1,
    "average": 9.666667,
    "density": 0.5,
    "unknowns": "",
    "distributions": {
      "Nine": 0.33333334,
      "Ten": 0.6666667
    }
}
Metadata

Version

3.0.1

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows