Giter VIP home page Giter VIP logo

ecdict's Introduction

ecdict

npm license size

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

数据来源:skywind3000/ECDICT.

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

不适用于浏览器。

English Documentation

Online Demo

🖼️ Gallery

image-20221228171536669

📗 目录

  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 之间的词语难度等级

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.