forked from HIT-SCIR/ltp
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
49 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
#!/usr/bin/env python | ||
# -*- coding: utf-8 -*- | ||
import os | ||
import sys | ||
|
||
toc = ["简介", | ||
"开始使用ltp", | ||
"使用ltp_test以及模型", | ||
"编程接口", | ||
"使用其他语言调用ltp", | ||
"使用ltp_server", | ||
"实现原理与性能", | ||
"使用训练套件", | ||
"发表论文", | ||
"附录"] | ||
|
||
if __name__=="__main__": | ||
if len(sys.argv) < 2 or not os.path.isdir(sys.argv[1]): | ||
print >> sys.stderr, "argument is not a directory" | ||
sys.exit(1) | ||
|
||
print """LTP使用文档v3.0 | ||
=============== | ||
#### 更新信息 | ||
* 刘一佳 << [email protected] >> 2014年6月14日,增加使用其他语言调用ltp一节 | ||
* 牛国成 << [email protected] >> 2014年5月10日,增加词性词典相关文档 | ||
* 韩冰 << [email protected] >> 2014年1月16日,增加模型裁剪相关文档 | ||
* 刘一佳 << [email protected] >> 2013年7月17日,创建文档 | ||
版权所有:哈尔滨工业大学社会计算与信息检索研究中心 | ||
""" | ||
|
||
print """## 目录""" | ||
|
||
for title in toc: | ||
print "* [%s](#%s)" % (title, title) | ||
|
||
for title in toc: | ||
try: | ||
fp=open(os.path.join(sys.argv[1], title + ".md"), "r") | ||
except: | ||
continue | ||
|
||
print "# %s" % title | ||
print fp.read().strip() | ||