npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

ecdict

v0.0.4

Published

JavaScript interface for ECDICT

Downloads

1

Readme

ecdict

npm license size

ECDict: JavaScript 免费的英汉词典数据集。

数据来源:skywind3000/ECDICT.

包含大约 200M 数据(安装后的大小)。

不适用于浏览器。

English Documentation

目录

  1. 开始使用
  2. 查询单词
  3. 搜索原型

开始使用

npm i ecdict

数据集将于安装后生成于 node_modules/ecdict/data.

查询单词

import { searchWord } from "ecdict";

searchWord("happy", {
  withResemble: true,
  withRoot: true,
  caseInsensitive: true,
});

参数

| Name | Type | Description | | ------- | ------ | -------------------- | | entry | string | 必须,所查询的单词。 | | options | object | 可选,参见下表。 |

Options

| Name | Type | Description | | --------------- | ------- | ------------------ | | withResemble | boolean | 可选,包含相似词汇 | | withRoot | boolean | 可选,进行词根搜索 | | caseInsensitive | boolean | 可选,大小写不敏感 |

输出

| Name | Type | Description | | ----------- | ------ | ---------------------------------------------------------- | | entry | string | 输入的查询词 | | lemma | string | 其原型 | | word | string | 词典中对应的单词 | | definition | string | 英文释义 | | translation | string | 中文释义 | | frequency | number | 词频 | | level | number | 以幼稚方式计算出的 1~10 之间的词语难度等级 | | exchange | string | 其变化形 | | phonetic | string | 音标 | | pos | string | 词语位置,用 "/" 分割不同位置 | | collins | string | 柯林斯星级 | | oxford | string | 是否是牛津三千核心词汇 | | tag | string | 字符串标签:zk/中考,gk/高考,cet4/四级 等等标签,空格分割 | | bnc | string | 英国国家语料库词频顺序 | | frq | string | 当代语料库词频顺序 | | resemble | object | 参见下表 | | root | object | 参见下表 |

更多信息参见:skywind3000/ECDICT

resemble

| Name | Type | Description | | ----------- | -------- | ----------- | | synonyms | string[] | 近义词列表 | | description | string | 描述 | | dict | object | 参见下表 |

resemble.dict

| Name | Type | Description | | ---------- | ------ | ----------- | | word | string | 单词 | | definition | string | 中文释义 |

root

| Name | Type | Description | | -------- | -------- | ----------- | | root | string[] | 词根列表 | | synonyms | string[] | 近义词列表 | | antonyms | string[] | 反义词列表 | | class | string | 词根类型 | | examples | string[] | 例词 | | meaning | string | 英文释义 | | function | string | 功能 | | origin | string | 语源 |

搜索原型

import { findLemma } from "ecdict";

findLemma("burns", true);

参数

| Name | Type | Description | | --------------- | ------- | ------------------ | | word | string | 必须,所搜索的单词 | | caseInsensitive | boolean | 可选,大小写不敏感 |

输出

| Name | Type | Description | | --------- | ------ | ------------------------------------------ | | word | string | 原型 | | frequency | number | 词频 | | level | number | 以幼稚方式计算出的 1~10 之间的词语难度等级 |