#nlp #thesaurus #synonyms

bin+lib thesauromatic

thesauromatic 是一个命令行同义词词典,当输入一个单词时返回相关单词。输出单词每行一个,便于在 shell 管道中进行处理。

2 个版本

0.0.11 2021年10月26日
0.0.10 2021年10月26日

#908 in 文本处理

AGPL-3.0

9.5MB
72

image image image

thesauromatic

无依赖的命令行 CLI 同义词词典

演示

基本上,只需提供一个单词,就能得到一串相似或相关的单词

$ ./thesauromatic deluge
Niagara
abound
affusion
alluvion
alluvium

<...snip...>

waterflood
watering
waterspout
wet
wetting
whelm
whelming

功能

  • 来自 Moby 项目 的同义词
  • 静态编译,单词列表已链接。无依赖。只需为目标平台下载可执行文件。
  • 速度快;输出单词大约需要 40 毫秒。这使得它易于从您的编辑器中驱动,并且可以离线工作。

安装

只需下载可执行文件。查看 发布 选项卡。

创建新版本

要创建新版本,请使用 bumpversion 工具增加版本号;这将更新所有正确的位置的版本号,提交这些更改,并添加一个匹配的 git 标签。然后推送这些更改

$ bumpversion patch
$ git push --tags origin master

然后转到 https://github.com/cjrh/thesauromatic/releases 并创建一个新版本,使用上面创建的相同标签。

要构建发布二进制文件,请使用 dub

$ dub build --build=release

然后将该二进制文件上传到刚刚创建的 GitHub 发布版。

技巧与窍门

利用 CLI 过滤器!如何将输出格式化为列?

$ ./thesauromatic flippant | column -c70
airy            facetious       leering         smart
bantering       facy            light-hearted   smart-alecky
belittling      fleering        malapert        smart-ass
biggety         flip            mocking         smirking
bluff           fooling         nervy           sneering
booing          forgetful       oblivious       snickering
brash           free and easy   offhand         sniggering
brazen          fresh           offhanded       snorting
careless        frivolous       panning         supercilious
casual          gally           perfunctory     superficial
catcalling      gratuitous      pert            tactless
chaffing        grinning        quizzical       taunting
cheeky          heedless        ragging         teasing
chutzpadik      hissing         railing         thoughtless
cocky           hooting         rallying        twitting
contemptuous    impertinent     razzing         uncalled-for
crusty          impudent        reckless        undiplomatic
cursory         inconsiderate   regardless      unheedful
degage          indifferent     respectless     unheeding
derisive        insolent        ridiculing      unmindful
derisory        insouciant      roasting        unprepared
discourteous    irreverent      rude            unready
dismissive      jeering         sassy           unserious
disregardant    jocular         saucy           unsolicitous
disregardful    joshing         scoffing        untactful
disrespectful   kidding         scornful        unthinking
easygoing       lazy            shallow         wise-ass

也许你还在尝试完成一个关于字母 r押韵

$ ./thesauromatic flippant | grep ^r | column -c70
ragging         razzing         respectless     rude
railing         reckless        ridiculing
rallying        regardless      roasting

依赖关系