Code Monkey home page Code Monkey logo

hanlp-python's Introduction

README

This README would normally document whatever steps are necessary to get your application up and running.

What is this repository for?

  • hanLP為 hankcs 所開發的中文NLP,這邊用python改寫成 api

How do I get set up?

建置環境

  • 用 git clone --depth 1 複製此專案

  • 下載 data包 按此下載 並解壓至 lib/hanlp-1.3.2/data

  • 安裝 python3 及相關 pip套件

apt-get update;
apt-get install python3 python3-pip -y;
pip3 install pyyaml

  • 安裝 java:8 ubuntu:16.10 安裝指令如下
apt-get install software-properties-common -y
add-apt-repository ppa:webupd8team/java 
apt-get update 
apt-get install oracle-java8-installer -y
  • 安裝 JPype
wget https://pypi.python.org/packages/d2/c2/cda0e4ae97037ace419704b4ebb7584ed73ef420137ff2b79c64e1682c43/JPype1-0.6.2.tar.gz
tar -xvzf JPype1-0.6.2.tar.gz
cd JPype1-0.6.2
python3 setup.py install
  • 測試
python3 example.py
  • 修改環境語言(如果測試檔無法順利顯示結果)
locale-gen zh_TW.UTF-8
echo 'export LC_ALL=zh_TW.UTF-8' >> ~/.bashrc
echo 'export LANG=zh_TW.UTF-8' >> ~/.bashrc
echo 'export LANGUAGE=zh_TW.UTF-8' >> ~/.bashrc
source ~/.bashrc

hanlp-python's People

Contributors

yesseecity avatar

Watchers

 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.