Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
PaddlePaddle
book
提交
81ac7de5
B
book
项目概览
PaddlePaddle
/
book
通知
16
Star
4
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
40
列表
看板
标记
里程碑
合并请求
37
Wiki
5
Wiki
分析
仓库
DevOps
项目成员
Pages
B
book
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
40
Issue
40
列表
看板
标记
里程碑
合并请求
37
合并请求
37
Pages
分析
分析
仓库分析
DevOps
Wiki
5
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
81ac7de5
编写于
1月 19, 2017
作者:
C
caoying03
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
follow all comments.
上级
ac20da57
变更
8
展开全部
隐藏空白更改
内联
并排
Showing
8 changed file
with
147 addition
and
224 deletion
+147
-224
label_semantic_roles/.gitignore
label_semantic_roles/.gitignore
+11
-1
label_semantic_roles/README.md
label_semantic_roles/README.md
+125
-217
label_semantic_roles/data/get_data.sh
label_semantic_roles/data/get_data.sh
+5
-0
label_semantic_roles/dataprovider.py
label_semantic_roles/dataprovider.py
+2
-2
label_semantic_roles/db_lstm.py
label_semantic_roles/db_lstm.py
+3
-3
label_semantic_roles/image/bio_example.png
label_semantic_roles/image/bio_example.png
+0
-0
label_semantic_roles/image/dependency_parsing.png
label_semantic_roles/image/dependency_parsing.png
+0
-0
label_semantic_roles/train.sh
label_semantic_roles/train.sh
+1
-1
未找到文件。
label_semantic_roles/.gitignore
浏览文件 @
81ac7de5
data/train.list
data/train.list
data/test.list
data/test.*
data/conll05st-release.tar.gz
data/conll05st-release
data/predicate_dict
data/label_dict
data/word_dict
data/emb
data/feature
output
predict.res
train.log
label_semantic_roles/README.md
浏览文件 @
81ac7de5
此差异已折叠。
点击以展开。
label_semantic_roles/data/get_data.sh
100755 → 100644
浏览文件 @
81ac7de5
...
@@ -19,7 +19,12 @@ wget http://paddlepaddle.bj.bcebos.com/demo/srl_dict_and_embedding/targetDict.tx
...
@@ -19,7 +19,12 @@ wget http://paddlepaddle.bj.bcebos.com/demo/srl_dict_and_embedding/targetDict.tx
wget http://paddlepaddle.bj.bcebos.com/demo/srl_dict_and_embedding/wordDict.txt
wget http://paddlepaddle.bj.bcebos.com/demo/srl_dict_and_embedding/wordDict.txt
wget http://paddlepaddle.bj.bcebos.com/demo/srl_dict_and_embedding/emb
wget http://paddlepaddle.bj.bcebos.com/demo/srl_dict_and_embedding/emb
tar
-xzvf
conll05st-tests.tar.gz
tar
-xzvf
conll05st-tests.tar.gz
mv
verbDict.txt predicate_dict
mv
targetDict.txt label_dict
mv
wordDict.txt word_dict
rm
conll05st-tests.tar.gz
rm
conll05st-tests.tar.gz
cp
./conll05st-release/test.wsj/words/test.wsj.words.gz
.
cp
./conll05st-release/test.wsj/words/test.wsj.words.gz
.
cp
./conll05st-release/test.wsj/props/test.wsj.props.gz
.
cp
./conll05st-release/test.wsj/props/test.wsj.props.gz
.
gunzip
test.wsj.words.gz
gunzip
test.wsj.words.gz
...
...
label_semantic_roles/dataprovider.py
浏览文件 @
81ac7de5
...
@@ -29,8 +29,8 @@ def hook(settings, word_dict, label_dict, predicate_dict, **kwargs):
...
@@ -29,8 +29,8 @@ def hook(settings, word_dict, label_dict, predicate_dict, **kwargs):
'ctx_n1_data'
:
integer_value_sequence
(
len
(
word_dict
)),
'ctx_n1_data'
:
integer_value_sequence
(
len
(
word_dict
)),
'ctx_0_data'
:
integer_value_sequence
(
len
(
word_dict
)),
'ctx_0_data'
:
integer_value_sequence
(
len
(
word_dict
)),
'ctx_p1_data'
:
integer_value_sequence
(
len
(
word_dict
)),
'ctx_p1_data'
:
integer_value_sequence
(
len
(
word_dict
)),
'ctx_p2_data'
:
integer_value_sequence
(
len
(
predicate
_dict
)),
'ctx_p2_data'
:
integer_value_sequence
(
len
(
word
_dict
)),
'verb_data'
:
integer_value_sequence
(
len
(
word
_dict
)),
'verb_data'
:
integer_value_sequence
(
len
(
predicate
_dict
)),
'mark_data'
:
integer_value_sequence
(
2
),
'mark_data'
:
integer_value_sequence
(
2
),
'target'
:
integer_value_sequence
(
len
(
label_dict
))
'target'
:
integer_value_sequence
(
len
(
label_dict
))
}
}
...
...
label_semantic_roles/db_lstm.py
浏览文件 @
81ac7de5
...
@@ -21,9 +21,9 @@ is_test = get_config_arg('is_test', bool, False)
...
@@ -21,9 +21,9 @@ is_test = get_config_arg('is_test', bool, False)
is_predict
=
get_config_arg
(
'is_predict'
,
bool
,
False
)
is_predict
=
get_config_arg
(
'is_predict'
,
bool
,
False
)
#file paths
#file paths
word_dict_file
=
'./data/word
Dict.tx
t'
word_dict_file
=
'./data/word
_dic
t'
label_dict_file
=
'./data/
targetDict.tx
t'
label_dict_file
=
'./data/
label_dic
t'
predicate_file
=
'./data/
verbDict.tx
t'
predicate_file
=
'./data/
predicate_dic
t'
train_list_file
=
'./data/train.list'
if
not
(
is_test
or
is_predict
)
else
None
train_list_file
=
'./data/train.list'
if
not
(
is_test
or
is_predict
)
else
None
test_list_file
=
'./data/test.list'
test_list_file
=
'./data/test.list'
...
...
label_semantic_roles/image/bio_example.png
查看替换文件 @
ac20da57
浏览文件 @
81ac7de5
50.7 KB
|
W:
|
H:
379.1 KB
|
W:
|
H:
2-up
Swipe
Onion skin
label_semantic_roles/image/dependency_parsing.png
0 → 100644
浏览文件 @
81ac7de5
43.9 KB
label_semantic_roles/train.sh
浏览文件 @
81ac7de5
...
@@ -14,7 +14,7 @@
...
@@ -14,7 +14,7 @@
# See the License for the specific language governing permissions and
# See the License for the specific language governing permissions and
# limitations under the License.
# limitations under the License.
set
-e
set
-e
./bin/paddle_trainer
\
paddle train
\
--config
=
./db_lstm.py
\
--config
=
./db_lstm.py
\
--use_gpu
=
0
\
--use_gpu
=
0
\
--log_period
=
10
\
--log_period
=
10
\
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录