想试试
Bamboo 1.1.0
不过遇到了一点问题,还望大家指教
我运行
./auto_build -tseg
他从网上下载下来语录
但是每次训练,发现好像会出现
./auto_build: line 29: read: read error: 0: Bad file descriptor
这种错误
我看了../data/people-daily-bamboo-edition.txt
还是满正常的
只是有一个空行而已
"""
团结/a 一致/a ,/w 扎实/ad 工作/v ,/w 奋勇/d 前进/v ,/w 一定/d 能够/v 创造/v
出/v 更加/d 辉煌/a 的/u 业绩/n !/w
19980101-01-003-001/m 北京/ns 举行/v 新年/t 音乐会/n
"""
另外,我仿照wiki上的演示程序,写了一个cpp程序
但是运行到
const char * text = "我爱北京天安门";
bamboo_setopt(handle, BAMBOO_OPTION_TEXT, const_cast<char *>(text));
就会报错
zuroc@aragorn ~/nlpbamboo/bamboo-python $ g++ test.cpp -lbamboo
-L/home/zuroc/lib
zuroc@aragorn ~/nlpbamboo/bamboo-python $ ./a.out
Segmentation fault
可能是什么原因呢?
谢谢大家的指教:)
我按照的不是默认路径,不过配置,CMake中的路径都已经改了
另外,现在有什么好的基于统计识别新词的算法吗?
有空想拿那些小组上的帖子算算新词玩:)
附:
错误信息
Segmentation Training:
Normalizing /home/zuroc/nlpbamboo/bamboo/bin/../data/people-daily-bamboo-edition.txt:
22721 items processed.
Building 1-gram Lexicon from
/home/zuroc/nlpbamboo/bamboo/bin/../build/normalized.txt:
57210 items generated.
making index
57210 items processed.
making index
0 items processed.
making index
29 items processed.
making index
0 items processed.
1). Training CRF Segment Model. (may take dozens of hours)
*). Do nothing.
./auto_build: line 29: read: read error: 0: Bad file descriptor
Done.
--
张沈鹏
软件工程师 Software Engineer
Douban Inc.
office: +86 8479 9008
Mobile: 13693622296
No.14 Jiuxianqiao Road, Area 51 A1-1-2106, Beijing 100016 , China
北京市酒仙桥路14号51楼A1区1门2016,100016
不太清楚为啥那行会有错,能否提供一下下面命令的输出信息:
readlink -f `which bash`
bash -V
另外,一个quick-fix的办法是把auto_build的第29行read choice,直接换成choice=1。然后直接制作crf模
型。
我改成choice=1就可以训练
不知道还会有什么问题
先睡觉去了:)
在问一个问题
crf_seg, crf分词
crf_pos,
crf_ner_nr
crf_ner_ns crf地名提取
crf_ner_nt
keyword 主题词
上面没有写对应中文的几个分别是干什么的呢?
我训练了十几个小时 才训练到
iter=43 terr=0.12477 serr=0.86126 act=14486516 obj=517100.03458 diff=0.01695
iter=44 terr=0.11792 serr=0.85598 act=14486516 obj=500330.10035 diff=0.03243
iter=45 terr=0.11513 serr=0.85356 act=14486516 obj=491568.99435 diff=0.01751
............