Code Monkey home page Code Monkey logo

rime-sogou's Introduction

rime-sogou

搜狗細胞詞庫解析

Command-line Usage

Installation

npm i rime-sogou -g

or

yarn global add rime-sogou

Usage

rime-sogou ./dictionaries/computer.scel

this will write a luna_pinyin.computer.dict.yaml file

Module Usage

Installation

npm i rime-sogou

or

yarn add rime-sogou

Usage

const fs = require('fs')
const RimeSogou = require('rime-sogou')

let data = fs.readFileSync('./dictionaries/computer.scel')
let rimeSogou = new RimeSogou(data)

console.log(rimeSogou.info())

/*
{ name: '计算机词汇大全【官方推荐】',
  type: '计算机科技',
  description: '官方推荐,词库来源于网友上传!',
  example:
   [ '自动文件分类\r',
     '扩散激发模型\r',
     '安天盾防火墙\r',
     '金狐盗号木马\r',
     '事件提供程序\r',
     '异动处理单位' ] }
*/

console.log(rimeSogou.chinese())

/*
[ { word: '阿姆达尔定律',
   pinyin: [ 'a', 'mu', 'da', 'er', 'ding', 'lv' ],
   frequency: 3419 },
 { word: '阿帕网', pinyin: [ 'a', 'pa', 'wang' ], frequency: 4902 },
 { word: '埃尔布朗基',
   pinyin: [ 'ai', 'er', 'bu', 'lang', 'ji' ],
   frequency: 4362 },
 { word: '埃尔米特函数',
   pinyin: [ 'ai', 'er', 'mi', 'te', 'han', 'shu' ],
   frequency: 2429 },
 { word: '埃克特', pinyin: [ 'ai', 'ke', 'te' ], frequency: 2718 },
 { word: '艾丽莎病毒',
   pinyin: [ 'ai', 'li', 'sha', 'bing', 'du' ],
   frequency: 9948 },
 { word: '安德夫木马',
   pinyin: [ 'an', 'de', 'fu', 'mu', 'ma' ],
   frequency: 10051 },
 { word: '按钮类型',
   pinyin: [ 'an', 'niu', 'lei', 'xing' ],
   frequency: 2135 },
 ... 10199 more items ]
*/

Author

rime-sogou © metowolf.

Blog @meto · GitHub @metowolf · Twitter @metowolf · Telegram Channel @metooooo

rime-sogou's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

rime-sogou's Issues

生成computer.secl文件时报错

安装 npm i rime-sogou -g
当我使用rime-sogou ./dictionaries/computer.scel,报错如下
image
我的理解是路径文件不存在,但是不是应该是生成文件么?
烦请大大看看是什么问题

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.