norm

command
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: MIT Imports: 8 Imported by: 0

README

Norm

Norm is a utility to normalize Japanese language text files.

Usage:

norm [flags] [path ...]

The flags are:

-v
	Show version
-h
	Show help
-f
	Show help of the normalization flags
-flag string
	Normalization flag (default "Fold")

Examples:

To read standard input:
$ echo "ABCアイウ" | norm
ABCアイウ

$ echo "ABCアイウ" | norm -flag KanaToHiragana
ABCあいう

$ echo "ABCアイウ" | norm -flag "AlphaToNarrow|AlphaToLower|KanaToHiragana"
abcあいう
If you have the following files,
$ cat basho_en.txt
--Keene, Narrow Road 99
To read this file:
$ norm -flag "AlphaToWide|AlphaToUpper" basho_en.txt
--KEENE, NARROW ROAD 99

$ norm -flag "LatinToWide|AlphaToUpper" basho_en.txt
--KEENE, NARROW ROAD 99
If you have the following files,
$ cat basho_jp.txt
閑さや岩にしみ入る蝉の声
To read this file:
$ norm -flag HiraganaToKatakana basho_jp.txt
閑サヤ岩ニシミ入ル蝉ノ声

$ norm -flag HiraganaToNarrow basho_jp.txt
閑サヤ岩ニシミ入ル蝉ノ声

Documentation

Overview

Norm is a utility to normalize Japanese language text files.

Usage:

norm [flags] [path ...]

The flags are:

-v
	Show version
-h
	Show help
-f
	Show help of the normalization flags
-flag string
	Normalization flag (default "Fold")

Examples:

To read standard input:

$ echo "ABCアイウ" | norm
ABCアイウ

$ echo "ABCアイウ" | norm -flag KanaToHiragana
ABCあいう

$ echo "ABCアイウ" | norm -flag "AlphaToNarrow|AlphaToLower|KanaToHiragana"
abcあいう

If you have the following files,

$ cat basho_en.txt
--Keene, Narrow Road 99

To read this file:

$ norm -flag "AlphaToWide|AlphaToUpper" basho_en.txt
--KEENE, NARROW ROAD 99

$ norm -flag "LatinToWide|AlphaToUpper" basho_en.txt
--KEENE, NARROW ROAD 99

If you have the following files,

$ cat basho_jp.txt
閑さや岩にしみ入る蝉の声

To read this file:

$ norm -flag HiraganaToKatakana basho_jp.txt
閑サヤ岩ニシミ入ル蝉ノ声

$ norm -flag HiraganaToNarrow basho_jp.txt
閑サヤ岩ニシミ入ル蝉ノ声

Jump to

Keyboard shortcuts

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