- Notifications
You must be signed in to change notification settings - Fork2
Given Name Searcher in Japanese
License
Kuniwak/name
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
条件に当てはまる名前の候補を列挙します。五格分類法に対応しています。
$name search --space common 山田< ./filter.json| tee result.tsv評点 画数 名前 読み 性別 天格 地格 人格 外格 総格15 16 匠真 ショウマ 両性 吉 大吉 大吉 大吉 大大吉14 23 奨真 ショウマ 両性 吉 大吉 吉 大吉 大大吉...
まずフィルタを用意します。フィルタは名前の候補について真であれば候補を残し、偽であれば候補を除去します。
説明 | 構文 | 例 |
---|---|---|
真 | {"true": {}} | {"true": {}} |
偽 | {"false": {}} | {"false": {}} |
論理積 | {"and": [filter...]} | {"and": [{"yomiCount": {"rune": "ア", "count": {"equal": 1}}}, {"yomiCount": {"rune": "イ", "count": {"equal": 1}}}]} |
論理和 | {"or": [filter...]} | {"or": [{"yomiCount": {"rune": "ア", "count": {"equal": 1}}}, {"yomiCount": {"rune": "イ", "count": {"equal": 1}}}]} |
否定論理 | {"not": filter} | {"not": {"yomiCount": {"rune": "ア", "count": {"equal": 1}}}} |
性別 | {"sex": sex} | {"sex": "asexual"} |
sex | "asexual" or"male" or"female" | {"sex": "asexual"} |
長さ | {"length": count} | {"length": 3} |
読み仮名のモーラ数 | {"mora": count} | {"mora": {"equal": 3}} |
画数 | {"strokes": count} | {"strokes": {"lessThan": 25}} |
指定した読み仮名の数 | {"yomiCount": {"rune": string, "count": count}} | {"yomiCount": {"rune": "ア", "count": {"equal": 1}}} |
指定した漢字の数 | {"kanjiCount": {"rune": string, "count": count}} | {"kanjiCount": {"rune": "漢", equal": 1}} |
count | {"equal": byte} or{"lessThan": byte} or{"greaterThan": byte} | {"lessThan": 1} |
よくある読み仮名 | {"commonYomi": {}} | {"commonYomi": {}} |
五格それぞれの最小値 | {"minRank": 0-4} (4 =大大吉,3 =大吉,2 =吉,1 =凶,0 =大凶) | {"minRank": 3} |
五格の合計値の最小値 | {"minTotalRank": byte} | {"minTotalRank": 11} |
五格に不明を含まない | {"hasNoUnknown": {}} | {"hasNoUnknown": {}} |
読み仮名のマッチ | {"yomi": match} | {"yomi": {"endWith": "ウ"}} |
漢字のマッチ | {"kanji": match} | {"kanji": {"startWith": "太"}} |
match | {"equal": string} or{"startWith": string} or{"endWith": string} | {"startWith": "タロ"} |
フィルタの例
{"and": [ {"sex":"male"}, {"commonYomi": {}}, {"mora": {"equal":3}}, {"minRank":2}, {"minTotalRank":11}, {"or": [ {"and": [ {"yomiCount": {"rune":"ユ","count": {"equal":1}}}, {"yomiCount": {"rune":"ウ","count": {"equal":0}}}, {"yomiCount": {"rune":"サ","count": {"lessThan":2}}}, {"yomiCount": {"rune":"キ","count": {"equal":0}}} ] }, {"and": [ {"yomiCount": {"rune":"ユ","count": {"equal":0}}}, {"yomiCount": {"rune":"ウ","count": {"equal":1}}}, {"yomiCount": {"rune":"サ","count": {"lessThan":2}}}, {"yomiCount": {"rune":"キ","count": {"equal":0}}} ] }, {"and": [ {"yomiCount": {"rune":"ユ","count": {"equal":0}}}, {"yomiCount": {"rune":"ウ","count": {"equal":0}}}, {"yomiCount": {"rune":"サ","count": {"equal":0}}}, {"yomiCount": {"rune":"キ","count": {"equal":1}}} ] } ] } ]}
よくある人名の空間から名前候補を探索します。時間はほとんどかかりません。
$name search --space common 山田< ./filter.json| tee result.tsv評点 画数 名前 読み 性別 天格 地格 人格 外格 総格15 16 匠真 ショウマ 両性 吉 大吉 大吉 大吉 大大吉14 23 奨真 ショウマ 両性 吉 大吉 吉 大吉 大大吉...
常用漢字+人名用漢字の空間から名前候補を探索します。かなり時間がかかります。現実的な時間で探索を終えるために--max-length
を指定するなら3
以下を推奨します。
$name search --space full 山田 --max-length 2< ./filter.json| tee result.tsv評点 画数 名前 読み 性別 天格 地格 人格 外格 総格14 16 丈辞 ジョウジ 男性 吉 大吉 吉 大吉 大大吉13 21 丈騎 タケキ 男性 吉 大吉 吉 大吉 大吉...
$name info 山田 太郎 タロウ評点 画数 名前 読み 天格 地格 人格 外格 総格8 13 太郎 タロウ 吉 大吉 大凶 大凶 大吉
$name filter validate< filter.json$echo$?0
$name filtertest 山田 太郎 タロウ< filter.json$echo$?1
$name filter apply 山田 --to /path/to/result.tsv< ./filter.json評点 画数 名前 読み 性別 天格 地格 人格 外格 総格14 16 丈辞 ジョウジ 男性 吉 大吉 吉 大吉 大大吉13 21 丈騎 タケキ 男性 吉 大吉 吉 大吉 大吉...
$name yomi 太郎タロウ...
$name validate 太郎$echo$?0$name validate 龘'龘' is not in 常用漢字 or 人名用漢字 or ひらがな or カタカナ$echo$?1
brew install mecab mecab-ipadic
を実行NEologd をインストール(推奨)
以下を実行:
$export CGO_LDFLAGS="`mecab-config --libs`"$export CGO_CFLAGS="`mecab-config --cflags`"$go install github.com/Kuniwak/name
sudo apt install mecab libmecab-dev mecab-ipadic-utf8
NEologd をインストール(推奨)
以下を実行:
$export CGO_LDFLAGS="`mecab-config --libs`"$export CGO_CFLAGS="`mecab-config --cflags`"$go install github.com/Kuniwak/name
管理者権限の MinGW 環境で
.\assets\bin\install-mecab-mingw
を実行環境変数
MECABRC
にC:\MeCab\etc\mecabrc
を設定環境変数
PATH
にC:\MeCab\bin
を追加dotnet tool install -g MecabConfig
を実行 (.NET 8 が必要)NEologd をインストール(推奨)
PowerShell で以下を実行:
$$Env:CGO_LDFLAGS = mecab-config --libs$$Env:CGO_CFLAGS = mecab-config --cflags$go install github.com/Kuniwak/name
MIT License
About
Given Name Searcher in Japanese
Topics
Resources
License
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Uh oh!
There was an error while loading.Please reload this page.
Contributors2
Uh oh!
There was an error while loading.Please reload this page.