Coder Social home page Coder Social logo

wende's Introduction

Wende

Wende(问得) Chinese Question Answering, is a small and simple factoid chinese question answering system written in Python. You ask a chinese natural language question and Wende will try to give a certain answer of the question. This is still a work in progress, currently the system can only judge the type of the question that the user ask, which means, only the question classification module has been implemented.

Run on Windows

Your PC should be 64-bit and at least has 4G RAM!

  1. 安装 Anaconda。Anaconda 是一个集成的 Python 科学计算环境,可以免去在 Windows 下安装诸如 numpy、scipy 等科学计算类库的烦恼与痛苦。请选择 Python2.7 64-bit 的版本进行安装,安装过程全部默认。 conda_win_installer

  2. 安装 Microsoft Visual C++ Compiler for Python 2.7, 由于需要编译安装 pyltp,所以需要安装编译器 VC for Python

  3. 安装 Git-Bash,安装过程全部默认。然后打开 Git-Bash, 本地新建一个目录并克隆本仓库的源码

    $ mkdir -p /c/workspace && cd /c/workspace
    $ git clone https://github.com/h404bi/wende
    $ cd wende/
    $ git submodule update --init --recursive

    稍等片刻克隆完毕后,可以在 Git-Bash 下看看刚才安装的 Anaconda 是否能正常使用。

    $ conda -V
    $ winpty python --version
    $ conda list
  4. 配置项目依赖环境
    接着上面的 Git-Bash 窗口,安装项目依赖。

    先更新 conda 自带的类库

    $ conda update --all --yes

    然后安装 requirements.txt 中的依赖

    $ conda install --file requirements_conda.txt --yes
    $ pip install -r requirements_pip.txt

    之后编译安装 pyltp

    $ cd pyltp/ && winpty python setup.py install

    查看 conda 已安装的类库

    $ cd .. && conda list
  5. 下载相关模型(LTP/Wende/Word2Vec)
    LTP(哈工大语言技术平台):原地址,选择模型版本 3.3.0
    Wende & Word2Vec:百度云(密码: 1dbm),其中也可以自行训练 Wende 的模型,具体请见 wende/classification/model.py 文件 所有模型文件请放到 data/models/ 下对应的目录

  6. 测试与运行
    直接运行 Web App

    $ winpty python -m app

    Ctrl+C 退出

    运行分类器评估测试

    $ winpty python -m evaluation.evaluate_models

    运行特征提取评估测试

    $ winpty python -m evaluation.evaluate_features

Run on Linux / Mac

Coming soon...

License

Code: MIT. Copyright (c) 2016 by Chawye Hsu
Data: CC BY-NC-SA 4.0, except for the ltp model use its original license.
这只是我的学士学位毕业设计项目(This is just the graduation project of my bachelor's degree)

wende's People

Contributors

h404bi 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.