Create YAML file of AWS term to be used with textlint library phr.
Output YAML file which can be used for phr of textlint library.
It is acquiring and using AWS terminology of Japanese in the following Web page.
You can customize the expression by writing it in the setting file.
see also:
- アマゾン ウェブ サービス: AWS の用語集
- It is made by golang so it supports multi form.
- You can control the operation in the setting file.
- You can customize the format of the string you want to check in phr format.
- Go 1.9+
- Packages in use
- PuerkitoBio/goquery: A little like that j-thing, only in Go.
Just run the only one command.
$ ./awr
However, setting is necessary to execute.
-
In the same place as the binary file create execution settings file.
-
Execution settings are done with
config.json
file.
{
"URL": "https://docs.aws.amazon.com/ja_jp/general/latest/gr/glos-chap.html",
"Rules": [
{
"Expected": "AWS マネジメントコンソール",
"Patterns": [
"AWS マネージメントコンソール",
"AWS Management Console"
]
},
{
"Expected": "アマゾン ウェブ サービス",
"Patterns": [
"Amazon Web Services",
"Amazon Web Service"
]
}
]
}
- About setting items
URL
: String- Specify the URL for acquiring the Japanese version of AWS terminology.
Rules
: Array- Specify the character string you want to customize as an array.
Expected
: String- Describe the correct character string.
- It must match exactly what is described in the AWS glossary.
Patterns
: Array- Write an array of the character strings you want to match with the check.
If you build from source yourself.
$ go get github.com/uchimanajet7/awr
$ cd $GOPATH/src/github.com/uchimanajet7/awr
$ go build
Download aws_words.yml
from the repository and specify it in the phr configuration file.
- awr/aws_words.yml at master · uchimanajet7/awr
see also:
-
textlint/textlint: The pluggable natural language linter for text and markdown.
-
azu/textlint-rule-prh: textlint rule for prh.
- textlintを使ってAWS用語をチェックしてみる #aws #textlint #golang - uchimanajet7のメモ