scel-parser

Sogou cell dict parser


Keywords
sogou, scel, dict, parser
License
MPL-2.0
Install
npm install scel-parser@1.0.1

Documentation

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/