Skip to content
This repository has been archived by the owner on Apr 21, 2020. It is now read-only.

Latest commit

 

History

History
37 lines (28 loc) · 637 Bytes

README.md

File metadata and controls

37 lines (28 loc) · 637 Bytes

Scel Parser

Typescript实现的搜狗细胞词库parser

Installation

npm i scel-parser

Usage

Command Line

# this will overwrite a example.scel.json file whihout confirm
scel-parser ./example.scel

Programmatically

import { readFile } from 'fs'
import ScelParser from 'scel-parser'

readFile(__dirname + 'example.scel', (err, data) => {
  if (err) {
    throw err
  }
  const parser = new ScelParser(data)
  console.log(parser.parseInfo())
  console.log(parser.parsePinyinTable())
  console.log(parser.parseWords())  
})

Download Scel Dict

http://pinyin.sogou.com/dict/