Giter VIP home page Giter VIP logo

chinese_models_for_spacy's Introduction

SpaCy 中文模型

为 SpaCy 提供的中文数据模型. 这些模型目前比较实现的比较粗糙并且还在 开发状态. 但毕竟“有总比没有的好”。

在线演示

基于 Jupyter notebook 的在线演示在 Binder

特性

部分 王小明在北京的清华大学读书 这个 Doc 对象的属性信息:

attributes_of_doc

NER (New!)

部分 王小明在北京的清华大学读书 这个 Doc 对象的 NER 信息:

ner_of_doc

开始使用

模型用二进制文件的形式进行分发, 用户应该具备基础的 SpaCy (version > 2) 的基础知识.

系统要求

Python 3 (也许支持 python2, 但未经过良好测试)

安装

releases 页面下载模型.

wget -c https://github.com/howl-anderson/Chinese_models_for_SpaCy/releases/download/v2.0.4/zh_core_web_sm-2.0.4.tar.gz

然后安装模型

pip install zh_core_web_sm-2.0.4.tar.gz

运行 Demo 代码

Demo 代码位于 test.py. 在安装好模型后,用户下载或者克隆本仓库的代码,然后可以直接执行

python3 ./test.py

打开地址 http://127.0.0.1:5000, 将看到如下:

Dependency of doc

如何从零构造这个模型

workflow

TODO list

  • 属性 pos_ 不正确. 这个和 SpaCy 中中文语言 Class 相关。
  • 属性 shape_ and is_alpha 似乎对中文并无意义, 但需要权威信息确认一下.
  • 属性 is_stop 不正确. 这个和 SpaCy 中中文语言 Class 相关。
  • 属性 vector 似乎没有训练的很好。
  • 属性 is_oov 完全错误. 第一优先级修复。
  • NER 模型,因为缺少 LDC 语料库,目前不可用. 正在解决中正在训练中。
  • 将训练中所用的中间结果 release 出来, 方便用户自行定制模型

使用的组件

  • TODO

如何贡献

请阅读 CONTRIBUTING.md , 然后提交 pull requests 给我们.

版本化控制

我们使用 SemVer 做版本化的标准. 查看 tags 以了解所有的版本.

作者

更多贡献者信息,请参考 contributors.

版权

MIT License - 详见 LICENSE.md

致谢

  • TODO

chinese_models_for_spacy's People

Contributors

howl-anderson avatar

Watchers

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