Skip to content

Commit

Permalink
使用conda安装时必须指定版本号jpype1==0.7.0
Browse files Browse the repository at this point in the history
  • Loading branch information
hankcs committed Oct 1, 2020
1 parent 85e1a0c commit c745ad5
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
# pyhanlp: Python interfaces for HanLP1.x

![pypi](https://img.shields.io/pypi/v/pyhanlp) [![Downloads](https://pepy.tech/badge/pyhanlp)](https://pepy.tech/project/pyhanlp) [![GitHub license](https://img.shields.io/github/license/hankcs/pyhanlp)](https://github.com/hankcs/pyhanlp/blob/master/LICENSE)

[HanLP1.x](https://github.com/hankcs/HanLP/tree/1.x)的Python接口,支持自动下载与升级[HanLP1.x](https://github.com/hankcs/HanLP/tree/1.x),兼容py2、py3。内部算法经过工业界和学术界考验,配套书籍[《自然语言处理入门》](http://nlp.hankcs.com/book.php)已经出版,欢迎查阅[随书代码](https://github.com/hankcs/pyhanlp/tree/master/tests/book)。基于深度学习的[HanLP2.0](https://github.com/hankcs/HanLP/tree/doc-zh)已于2020年初发布,面向下一个十年的前沿NLP技术,与1.x相辅相成,平行发展。

## 安装

先安装[JDK](http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html)。你需要保证JDK位数、操作系统位数和Python位数一致。然后[设置JAVA_HOME环境变量](https://bbs.hankcs.com/t/hanlp-java/999),最后执行:

```bash
conda install -c conda-forge jpype1==0.7.0 # (可选)conda安装jpype1更方便
pip install pyhanlp
```

Expand Down Expand Up @@ -150,10 +155,12 @@ python tests/test_hanlp.py

## 反馈

任何问题,请前往[HanLP issue区](https://github.com/hankcs/HanLP/issues)[论坛](https://bbs.hankcs.com/)反馈,谢谢。
任何bug,请前往[HanLP issue区](https://github.com/hankcs/HanLP/issues)。提问请上[论坛](https://bbs.hankcs.com/)反馈,谢谢。

## [《自然语言处理入门》](http://nlp.hankcs.com/book.php)

自然语言处理是一门博大精深的学科,掌握理论才能发挥出工具的全部性能。新手可考虑这本入门书:

![img](http://file.hankcs.com/img/nlp-book-squre.jpg)

一本配套HanLP的NLP入门书,基础理论与生产代码并重,Python与Java双实现。从基本概念出发,逐步介绍中文分词、词性标注、命名实体识别、信息抽取、文本聚类、文本分类、句法分析这几个热门问题的算法原理与工程实现。书中通过对多种算法的讲解,比较了它们的优缺点和适用场景,同时详细演示生产级成熟代码,助你真正将自然语言处理应用在生产环境中。
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
absl-py==0.1.10
jpype1>=0.7.0
jpype1==0.7.0

0 comments on commit c745ad5

Please sign in to comment.