押韵文本处理联想补全词语 文本与翻译

Datamuse词语查询API

Datamuse是一个词语查询引擎接口,支持按语义、读音与拼写条件找词(类似含义、相似读音、相似拼写)以及联想补全。无需Key,每天免费100000次请求。

查看官方文档 ↗

接入教程

https://api.datamuse.com/words?ml=ringing+in+the+ears
https://api.datamuse.com/words?rel_rhy=forgetful
https://api.datamuse.com/sug?s=hipp

1. 查询含义相近的词语:
2. 查询押韵词:
3. 联想补全:
4. 返回JSON数组包含word与score字段。
5. 每天100000次免费额度,无需Key。

Python 查询相似词

python
import requests

r = requests.get("https://api.datamuse.com/words", params={"ml": "happy"})
print([w["word"] for w in r.json()])

PHP 查询相似词

php
<?php
$url = 'https://api.datamuse.com/words?ml=happy';
$data = json_decode(file_get_contents($url), true);
foreach ($data as $w) { echo $w['word'] . PHP_EOL; }

JavaScript 查询相似词

javascript
fetch('https://api.datamuse.com/words?ml=happy')
  .then(r => r.json())
  .then(arr => arr.forEach(w => console.log(w.word)));

常见问题

需要Key吗?

当前无需Key,每天免费100000次请求。

免费额度多少?

每天100000次,超出可能被限速。

相似接口推荐

有道翻译API

有道翻译API基于有道神经网络翻译技术,支持中文与100多种语言互译,并提供OCR与语音服务。新注册用户获赠50元体验金,每月还可免费领取1万字符额度。

免费增值
Free Dictionary免费词典API

Free Dictionary API返回英文单词的音标、释义、发音音频与例句,免费永久使用、无需密钥,适合单词学习、游戏与语音类应用。

免费
Urban Dictionary网络俚语API

非官方Urban Dictionary API可查询网络俚语、获取定义与随机词汇。免费、开源、无速率限制、无需注册,适合学习与趣味应用。

免费
Alexa For Business

Alexa for Business 可帮助您在组织中使用 Alexa。它提供了大规模管理 Alexa 设备、注册用户和分配技能的工具。您可以使用 Alexa Skills Kit 和 Alexa for Busines

待确认