8000 GitHub - vntk/dictionary: Vietnamese Dictionary for Node
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

vntk/dictionary

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

dictionary

Vietnamese Dictionary for Node

MIT License npm version downloads Travis

Installation

Using npm:

npm install @vntk/dictionary --save

API Usage

Properties

  • words - List of words in the dictionary
  • lower_words - List of word in lower case
  • definitions - List of word definitions

Method: .has(word:string)

Check a word is exists in dictionary

const dictionary = require('@vntk/dictionary')

dictionary.has('chào')
// true

Method: .lookup(word:string)

Lookup word definitons

const dictionary = require('@vntk/dictionary')

let senses = dictionary.lookup('chào')
console.log(senses)

// Output
[ { example: 'chào thầy giáo ~ con chào mẹ',
    sub_pos: 'Vt',
    definition: 'tỏ thái độ kính trọng hoặc quan tâm đối với ai bằng lời nói hay cử chỉ, khi gặp nhau hoặc khi từ biệt',
    pos: 'V' },
    { example: 'đứng nghiêm làm lễ chào cờ',
    sub_pos: 'Vu',
    definition: 'tỏ thái độ kính cẩn trước cái gì thiêng liêng, cao quý',
    pos: 'V' },
    { example: 'chào hàng ~ lời chào cao hơn mâm cỗ (tng)',
    sub_pos: 'Vu',
    definition: 'mời ăn uống hoặc mua hàng',
    pos: 'V' }]

Contributing

Pull requests and stars are highly welcome.

For bugs and feature requests, please create an issue.

About

Vietnamese Dictionary for Node

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published
0