Git Product home page Git Product logo

hanlp-python-flask'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 server

  • Version: 0.2.1

How do I get set up?

  • Git clone this hanlp-python

  • 從 Dockerfile

    • 進入hanlp並建立環境的image檔

      $ cd hanlp-python

      
      >```
      $ sudo docker build -t hanlp:0.2.1 ./
      

      備註:

      1. sudo 指令在 mac 系統中不需要

      2. ./ 是指 Dockerfile 所在的資料夾,也就是本專案的根目錄

    • 下載 hanLP 的 data檔 並解壓到本專案的server/lib/hanlp-1.3.2/ 之後裡面會多一個 data的資料夾

    • 執行 docker image 並建立 container,並透過 volume 進行檔案的傳遞

      $ sudo docker run -it --name=hanlp020 -v ~/hanLP-python:/hanlp -p 0.0.0.0:80:5001 hanlp:0.2.0 /bin/bash

      
      指令說明:
      
      1. `--name` 是指container name
      
      2. `-v ~/hanLP-python:/hanlp`   
      是把本地端 ``~/hanLP-python`` 連結到 container 內的 ``/hanlp``
      
      3. `-p 0.0.0.0:80:5001`
      把本地端的 80 port 映射到 docker container 的 5001 port
      
      
    • 透過python執行python ./server/hanlp-server.py

hanlp-python-flask's People

Contributors

yesseecity avatar bt-chin avatar

Watchers

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