Coder Social home page Coder Social logo

pg_scws's Introduction

pg_scws

Lang BSD Extension

Postgresql full-text search extension for chinese
It implements by importing swcs.

INSTALL

  1. Downloads
git clone https://github.com/jaiminpan/pg_scws
  1. Compile

Make sure PostgreSQL is installed and command pg_config could be runnable.

cd pg_scws
USE_PGXS=1 make && make install

HOW TO USE & EXAMPLE

scws=# create extension pg_scws;
CREATE EXTENSION

scws=#  select * from to_tsvector('scwscfg', '小明硕士毕业于**科学院计算所,后在日本京都大学深造');
                                to_tsvector                                
---------------------------------------------------------------------------
 '**科学院计算所':4 '小明':1 '日本京都大学':5 '毕业':3 '深造':6 '硕士':2
(1 row)

scws=#  select * from to_tsvector('scwscfg', '李小福是创新办主任也是云计算方面的专家');
                                   to_tsvector                                   
---------------------------------------------------------------------------------
 '专家':10 '主任':5 '云':7 '创新':3 '办':4 '方面':9 '是':2,6 '李小福':1 '计算':8
(1 row)

USER DEFINED DICTIONARY

NOTE

It should work with PostgreSQL > 9.x Now only tested with PostgreSQL 9.4

MISC

scws project when you only need scws

zhparser project when you only need a thin pg layer (you need install scws separately before using zhparser)

Author

Jaimin Pan: [email protected]

pg_scws's People

Contributors

jaiminpan avatar

Watchers

James Cloos avatar  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.