Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
PaddleHub
提交
82a3f22c
P
PaddleHub
项目概览
PaddlePaddle
/
PaddleHub
接近 2 年 前同步成功
通知
284
Star
12117
Fork
2091
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
200
列表
看板
标记
里程碑
合并请求
4
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
P
PaddleHub
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
200
Issue
200
列表
看板
标记
里程碑
合并请求
4
合并请求
4
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
82a3f22c
编写于
8月 26, 2021
作者:
W
Wgm-Inspur
提交者:
GitHub
8月 26, 2021
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Correcting the error in example of Chinese segmentation in README_ch.md and README.md (#1585)
上级
4266d75f
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
27 addition
and
3 deletion
+27
-3
README.md
README.md
+13
-0
README_ch.md
README_ch.md
+14
-3
未找到文件。
README.md
浏览文件 @
82a3f22c
...
@@ -123,6 +123,7 @@ please add WeChat above and send "Hub" to the robot, the robot will invite you t
...
@@ -123,6 +123,7 @@ please add WeChat above and send "Hub" to the robot, the robot will invite you t
<a
name=
"QuickStart"
></a>
<a
name=
"QuickStart"
></a>
## QuickStart
## QuickStart
### The installation of required components.
```
python
```
python
# install paddlepaddle with gpu
# install paddlepaddle with gpu
# !pip install --upgrade paddlepaddle-gpu
# !pip install --upgrade paddlepaddle-gpu
...
@@ -132,8 +133,11 @@ please add WeChat above and send "Hub" to the robot, the robot will invite you t
...
@@ -132,8 +133,11 @@ please add WeChat above and send "Hub" to the robot, the robot will invite you t
# install paddlehub
# install paddlehub
!
pip
install
--
upgrade
paddlehub
!
pip
install
--
upgrade
paddlehub
```
### The simplest cases of Chinese word segmentation.
```
python
import
paddlehub
as
hub
import
paddlehub
as
hub
lac
=
hub
.
Module
(
name
=
"lac"
)
lac
=
hub
.
Module
(
name
=
"lac"
)
...
@@ -143,6 +147,15 @@ results = lac.cut(text=test_text, use_gpu=False, batch_size=1, return_tag=True)
...
@@ -143,6 +147,15 @@ results = lac.cut(text=test_text, use_gpu=False, batch_size=1, return_tag=True)
print
(
results
)
print
(
results
)
#{'word': ['今天', '是', '个', '好天气', '。'], 'tag': ['TIME', 'v', 'q', 'n', 'w']}
#{'word': ['今天', '是', '个', '好天气', '。'], 'tag': ['TIME', 'v', 'q', 'n', 'w']}
```
```
### The simplest command of deploying lac service.
</div>
```
python
!
hub
serving
start
-
m
lac
```
More model description, please refer
[
Models List
](
https://www.paddlepaddle.org.cn/hublist
)
More API for transfer learning, please refer
[
Tutorial
](
https://paddlehub.readthedocs.io/en/release-v2.1/transfer_learning_index.html
)
More API for transfer learning, please refer
[
Tutorial
](
https://paddlehub.readthedocs.io/en/release-v2.1/transfer_learning_index.html
)
<a
name=
"License"
></a>
<a
name=
"License"
></a>
...
...
README_ch.md
浏览文件 @
82a3f22c
...
@@ -139,13 +139,18 @@
...
@@ -139,13 +139,18 @@
[
【零基础linux安装并实现图像风格迁移】
](
./docs/docs_ch/get_start/linux_quickstart.md
)
[
【零基础linux安装并实现图像风格迁移】
](
./docs/docs_ch/get_start/linux_quickstart.md
)
###
极简中文分词案例
###
快速安装相关组件
</div>
</div>
```
python
```
python
!
pip
install
--
upgrade
paddlepaddle
-
i
https
:
//
mirror
.
baidu
.
com
/
pypi
/
simple
!
pip
install
--
upgrade
paddlepaddle
-
i
https
:
//
mirror
.
baidu
.
com
/
pypi
/
simple
!
pip
install
--
upgrade
paddlehub
-
i
https
:
//
mirror
.
baidu
.
com
/
pypi
/
simple
!
pip
install
--
upgrade
paddlehub
-
i
https
:
//
mirror
.
baidu
.
com
/
pypi
/
simple
```
### 极简中文分词案例
</div>
```
python
import
paddlehub
as
hub
import
paddlehub
as
hub
lac
=
hub
.
Module
(
name
=
"lac"
)
lac
=
hub
.
Module
(
name
=
"lac"
)
...
@@ -154,11 +159,17 @@ test_text = ["今天是个好天气。"]
...
@@ -154,11 +159,17 @@ test_text = ["今天是个好天气。"]
results
=
lac
.
cut
(
text
=
test_text
,
use_gpu
=
False
,
batch_size
=
1
,
return_tag
=
True
)
results
=
lac
.
cut
(
text
=
test_text
,
use_gpu
=
False
,
batch_size
=
1
,
return_tag
=
True
)
print
(
results
)
print
(
results
)
#{'word': ['今天', '是', '个', '好天气', '。'], 'tag': ['TIME', 'v', 'q', 'n', 'w']}
#{'word': ['今天', '是', '个', '好天气', '。'], 'tag': ['TIME', 'v', 'q', 'n', 'w']}
```
### 一行代码部署lac(词法分析)模型
</div>
# 一行代码启动serving 服务,更多模型搜索可参考 https://www.paddlepaddle.org.cn/hublist
```
python
!
hub
serving
start
-
m
lac
!
hub
serving
start
-
m
lac
```
```
欢迎用户通过
[
模型搜索
](
https://www.paddlepaddle.org.cn/hublist
)
发现更多实用的预训练模型!
更多迁移学习能力可以参考
[
教程文档
](
https://paddlehub.readthedocs.io/zh_CN/release-v2.1/transfer_learning_index.html
)
更多迁移学习能力可以参考
[
教程文档
](
https://paddlehub.readthedocs.io/zh_CN/release-v2.1/transfer_learning_index.html
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录