
Research
PyPI Package Disguised as Instagram Growth Tool Harvests User Credentials
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
closewords
Advanced tools
A library for finding the most similar word from a list of words, supporting Japanese (including kanji). / 最も似た単語を単語群から検索する日本語(漢字含む)対応のライブラリ
A library for finding the most similar word from a list of words, supporting Japanese (including kanji).
最も似た単語を単語群から検索する日本語(漢字含む)対応のライブラリ
Note: it may be a little slow because it uses morphological analysis. By adopting
worker_threads
, the processing speed is slightly improved compared to the standard.
注意: 形態素解析を利用しているため多少遅い可能性があります。worker_threads
を採用しているため、標準より少しは処理速度は改善されています。
The highest score is 1 (the lowest is 0).
A score of 1 means a perfect character-by-character match.
スコアの最高値は1です(最低値は0です)。
スコアが1の場合、文字列が完全に一致していることを示します。
const { closeWords } = require('closewords');
(async () => {
const word = '東京';
const candidates = ['東京', 'とっこう', '東きょう', 'とう京', 'とうきょう', 'とーきょー'];
try {
const result = await closeWords(word, candidates);
console.log('結果:', result);
// raw: true
const resultWithScores = await closeWords(word, candidates, true);
console.log('スコアを含む結果:', resultWithScores);
} catch (error) {
console.error('Error:', error);
}
})();
結果: [ '東京' ]
スコアを含む結果: [
{ word: '東京', score: 1 },
{ word: 'とう京', score: 0.6933333333333332 },
{ word: 'とうきょう', score: 0.48999999999999994 },
{ word: '東きょう', score: 0.468560606060606 },
{ word: 'とっこう', score: 0.4308888888888888 },
{ word: 'とーきょー', score: 0.41533333333333333 }
]
word.pronounce
and pronounce
in candidates[]
are completed Hepburn-style.
word.pronounce
と candidates[]
内の pronounce
をヘボン式で補完するようにしました。
Fixed bugs.
バグを修正しました。
Fixed score calculation.
スコア計算方法を修正しました。
Fixed score calculation.
スコア計算方法を修正しました。
Fixed README
.
Fixed the issue that only a string could be specified in word
.
Fixed the issue that word.pronounce
was ignored.
Fixed the issue that non-alphabet could be specified for word.pronounce
and pronounce
in candidates[]
.
word.pronounce
and pronounce
in candidates[]
are now optional.
Fixed a few pther bugs.
README
を修正しました。
word
に文字列以外指定できない問題を修正しました。
word.pronounce
が無視される問題を修正しました。
word.pronounce
と candidates[]
内の pronounce
にアルファベット以外を指定できる問題を修正しました。
word.pronounce
と candidates[]
内の pronounce
を任意にしました。
その他数件のバグを修正しました。
Added a way to specify the pronunciation of words.
単語の発音を指定する方法を追加しました。
Introduced fast-levenshtein
and fixed score calculation. The similarity of the original strings is also evaluated.
fast-levenshtein
を導入し、スコア計算方法を修正しました。元の文字列の一致度も評価されるようになりました。
Introduced jaro-winkler
and optimized.
jaro-winkler
を導入し、最適化しました。
Fixed score calculation.
スコア計算方法を修正しました。
Package released! Introducing morphological analysis.
パッケージをリリース! 形態素解析を導入しました。
FAQs
A library for finding the most similar word from a list of words, supporting Japanese (including kanji). / 最も似た単語を単語群から検索する日本語(漢字含む)対応のライブラリ
The npm package closewords receives a total of 8,401 weekly downloads. As such, closewords popularity was classified as popular.
We found that closewords demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
A deceptive PyPI package posing as an Instagram growth tool collects user credentials and sends them to third-party bot services.
Product
Socket now supports pylock.toml, enabling secure, reproducible Python builds with advanced scanning and full alignment with PEP 751's new standard.
Security News
Research
Socket uncovered two npm packages that register hidden HTTP endpoints to delete all files on command.