カテゴリー
ツール

abbreviate – 英単語の省略形を機械的に決めてくれるツール

dnnrly/abbreviate は、英単語を決まった規則で省略してくれるという、単機能のツールです。 Goで書かれていて、フルに書いた複数の英単語の並びを、内蔵の辞書で決まっている短縮形に置き換えます。 指定によって […]

dnnrly/abbreviate は、英単語を決まった規則で省略してくれるという、単機能のツールです。

Goで書かれていて、フルに書いた複数の英単語の並びを、内蔵の辞書で決まっている短縮形に置き換えます。

指定によってキャメルケース、パスカルケース、スネークケースなどにもしてくれます。

辞書ファイルに定義されていない単語は出ないため、実用にするにはもっと辞書の拡張が必要かなとも思います。

僕は基本的には省略形の利用に反対なのですが、プログラミング言語や環境によっては、命名に文字数の上限があるものもあるでしょう。abbreviateコマンドの作者は、AWSのリソース名をつける際に上限が問題になることが多くてこのツールを思いついたということです。

省略を多用するプログラマーやそのチームにおいて、元の英単語が必ずこの省略形になる、という保証をツールでするのであれば、ツールを使わないよりはずっと良いのかなとも思いました。

via Hacker News

「abbreviate – 英単語の省略形を機械的に決めてくれるツール」への1件の返信

Hi ‘abbreviate’ author here.

The original use case for the tool was to help reduce the size of AWS Cloud Formation stack names, especially where these were generated automatically. For example, where you are inserting a branch name that could be quite long.

If you have any concerns with the abbreviations that are available to you, then you have 2 options:
1. Use the custom abbreviation functionality so that you can specify your own set. (The –custom flag)
2. Extend the abbreviations to either add to the existing list OR add new sets (–set) and language packs (–language).

If you need support, feel free to raise an issue on the project and I’ll see what we can do to help you.

コメントは受け付けていません。