Giter Site home page Giter Site logo

jieba.el's Introduction

Jieba.el – 在Emacs中使用jieba中文分词

前言

本项目 fork 自该项目,所作修改如下:

  1. 原项目使用 node jieba, 该项目使用 python jieba
  2. 原项目每一个 buffer 会启用一个 jieba server, 本项目只需启用一个,每个 buffer 启用的是 client.

安装方式

安装依赖

pip install jieba

安装jieba.el

jieba.el 依赖于 jsonrpc, 而目前版本(29.2)的 Emacs 已经内置该模块

把 jieba.el 目录放入emacs的 load-path 中, 在 .emacs 文件中写入

(require 'jieba)
(setq jieba-current-backend 'python)
(jieba-mode)

使用方式

最重要的一点,需要提前手动启用 jieba-server.py.

想修改的话可以改动 jieba-python.el 中的 jieba--python-connect 函数,在 :process 的 lambda 中检查,若没有启动 server,则调用子进程启动。检查方式可以用 ps + grep. 我嫌麻烦懒得弄了,直接把 python /path/to/jieba.el/jieba-server.py & 写进了系统启动项里面。

使用方式详见原项目的 README.

jieba.el's People

Contributors

cireu avatar chen-chao avatar

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.