【求助】makedict 0.4.1-beta1 + dictconv 0.2的具体使用方法
各位坛友好。友坛中有一个专门关于stardict的帖子,上面提供了转换bgl和dsl到stardict的方式。
http://forum.ru-board.com/topic.cgi?forum=5&topic=16486
Код:
#!/bin/bash
PATH_DSL=$1
PATH_CUR=`pwd`
mkdir $PATH_CUR/stardict
mkdir -p $PATH_CUR/tmp/tmp
for i in $(ls $PATH_DSL | grep dsl$); do \
cp $1/*.ann ./tmp && \
iconv -f utf16 -t utf8 $PATH_DSL/$i | sed -r 's/\.+\.wav\[\/s\]//' >$PATH_CUR/tmp/$i.utf8 && \
iconv -f utf8 -t utf16 $PATH_CUR/tmp/$i.utf8 > $PATH_CUR/tmp/$i && \
rm -f $PATH_CUR/tmp/$i.utf8 && \
makedict -i dsl -o stardict $PATH_CUR/tmp/$i -d ./tmp/tmp; done
find $PATH_CUR/tmp/tmp -iname "*.*" \! -type d -exec mv \{\} $PATH_CUR/stardict/ \;
for i in $(ls $PATH_CUR/stardict | grep dict$); do dictzip $PATH_CUR/stardict/$i; done
for i in $(ls $PATH_CUR/stardict | grep idx$); do gzip -9$PATH_CUR/stardict/$i; done
rm -R $PATH_CUR/tmp
echo "Done""
上面的这段文字作何解释呢?
具体转换步骤是怎样的呢?不安装某些相应的软件或者导入某些环境变量好像在windows在无法直接使用 makedict+ dictconv呢。不知道哪位可以指导一下,多谢。 需要Linux环境,不过那里提供了windows版
http://coldpizza.narod.ru/makedict_dictconv_win32.zip
https://www.pdawiki.com/forum/data/attachment/album/201506/29/091530cfk8hc9zfhwzxor8.png
makedict.exe -i dsl -o stardict имя_словаря.dsl
或者用
pyglossary
https://github.com/ilius/pyglossary
python /Applications/Utilities/DictionaryDevelopmentKit/pyglossary/pyglossary.pyw --read-options=resPath=OtherResources --write-format=Stardict xxx.txt xxx.ifo 多谢楼主的大大!非常感谢!!
按照大大的方法成功啦!感谢感谢!
另外那个dictconv.exe的命令转换babylon的BGL的时候如何写呢?看了下说明还是不怎么明白。
Usage: dictconv [-hv] -o OUTPUT_FILE INPUT_FILE
Convert INPUT_FILE dictionary to OUTPUT_FILE dictionary.
The extension of file determines the dictionary type.
-oOUTPUT_FILE path to target dictionary
INPUT_FILE path to source dictionary
-h print help message and exit
-? print help message and exit
-v shows the version information and exit
INPUT_FILE can be:
Babylon Glossary (.bgl)
Freedict dictionary (.tei)
Sdictionary dictionary (.dct)
StarDict dictionary (.ifo)
OUTPUT_FILE can be:
DICT dictionary (.index)
PlainText dictionary (.dic)
StarDict dictionary (.ifo)
E:\makedict>dictconv.exe -o stardict Merriam_Webster_Advanced_Learners.BGL
You should specify a valid output file.
E:\makedict>dictconv.exe -o 1.ifo Merriam_Webster_Advanced_Learners.BGL
terminate called after throwing an instance of 'std::out_of_range'
what():basic_string::compare
1 dictconv 11696 open_stackdumpfile: Dumping stack trace to dictco
.exe.stackdump
E:\makedict>
胡乱尝试了几次还是不成功,烦请大大一并赐教,多谢。
本帖最后由 qunwang6 于 2015-6-29 12:29 编辑
liuyunrushui 发表于 2015-6-29 11:48
多谢楼主的大大!非常感谢!!
按照大大的方法成功啦!感谢感谢!
需要完整路径:dictconv -o c:\xxx.ifo c:\xxx.bgl不过会提示找不到iconv
其他方法
编译成StarDict格式的词典
方法一:
StarDict Editor
https://code.google.com/p/stardictproject/downloads/list
官方版本会有问题
搜索3.0.3便携版,里面有stardict editor
StarDictPortable-stardict.sourceforge.com_3.0.3.paf.exe
方法二:
pyglossary
https://github.com/ilius/pyglossary
python /Applications/Utilities/DictionaryDevelopmentKit/pyglossary/pyglossary.pyw --read-options=resPath=OtherResources --write-format=Stardict xxx.bgl xxx.ifo qunwang6 发表于 2015-6-29 12:22
需要完整路径:dictconv -o c:\xxx.ifo c:\xxx.bgl不过会提示找不到iconv
其他方法
编译成StarDict格 ...
多谢老大!
1。直接用dictconv果然会出现错误:
E:\makedict>dictconv -o e:\makedict\Merriam_Webster_Advanced_Learners.ifo e:\mak
edict\Merriam_Webster_Advanced_Learners.BGL
cygwin warning:
MS-DOS style path detected: e:\makedict\Merriam_Webster_Advanced_Learners.BGL
Preferred POSIX equivalent is: /makedict/Merriam_Webster_Advanced_Learners.BGL
CYGWIN environment variable option "nodosfilewarning" turns off this warning.
Consult the user's guide for more details about POSIX paths:
http://cygwin.com/cygwin-ug-net/using.html#using-pathnames
Error openning iconv library
E:\makedict>
2.下载了您说的这个编辑器StarDictPortable-stardict.sourceforge.com_3.0.3.paf.exe,安装后转换bgl的时候出现问题,如下:
Building...
Error, no new line char after word line: 1.
Done!
不知何故。
3.晚些时间试一下您推荐的这种方式
pyglossary
https://github.com/ilius/pyglossary
万分感谢楼主大大!谢谢。
liuyunrushui 发表于 2015-6-29 13:54
多谢老大!
1。直接用dictconv果然会出现错误:
所谓Babylon格式应该是要提取出文本,如何再用stardict editor转。
还有另一种方法用pyglossary把bgl转为table格式,然后再用stardict editor转。
python /Applications/Utilities/DictionaryDevelopmentKit/pyglossary/pyglossary.pyw --read-options=resPath=OtherResources --write-format=Tabfile 2.bgl 2.txt
不过可以直接
python /Applications/Utilities/DictionaryDevelopmentKit/pyglossary/pyglossary.pyw --read-options=resPath=OtherResources --write-format=Stardict xxx.bgl xxx.ifo qunwang6 发表于 2015-6-29 16:35
所谓Babylon格式应该是要提取出文本,如何再用stardict editor转。
还有另一种方法用pyglossary把bgl ...
多谢指教!
非常感谢! qunwang6 发表于 2015-6-29 16:35
所谓Babylon格式应该是要提取出文本,如何再用stardict editor转。
还有另一种方法用pyglossary把bgl ...
老大您好!
又来讨教了。
我下载了一部Macmillan English Dictionary,dsl的转换为tab文件后,用stardict-editor编辑为stardict的文件之后,用ebwin载入,发现html标签都显示出来了,ebwin显示结果具体如下,不知何故。我把txt文件传到百度云了,如果您有时间烦请指点一二,多谢多谢。
<k>take</k>
<b><font color=darkmagenta>▪ <c>I.</c></font></b> <b><font color=red>take</font></b> <sup>1</sup> <abr>UK</abr> <rref>zzz_uk_B_B34_B3447_B3447310.wav</rref>
百度云地址:
链接: http://pan.baidu.com/s/1bnEtV9H 密码: 6bx4
stardict加载该词库后还是一样,各种标签都显示出来啦!
怪哉!
我再网上下载过一些stardict的词库,用ebwin加载时可以显示颜色的呢!
肯定是哪个地方出错了!有给您添麻烦啦!多谢!
liuyunrushui 发表于 2015-7-1 14:51
stardict加载该词库后还是一样,各种标签都显示出来啦!
怪哉!
打开.ifo文件将里面的sametypesequence=m改为 sametypesequence=h
h代表html
Stardict editor assumes the input and therefore output is plain text.
Just open your .ifo file and change sametypesequence=m to sametypesequence=h
Then reindex the dictionary in GoldenDict.
For more info about "sametypesequence" check http://code.google.com/p/babiloo/wiki/StarDict_format
qunwang6 发表于 2015-7-1 15:24
打开.ifo文件将里面的sametypesequence=m改为 sametypesequence=h
h代表html
非常感谢您!
搞好了,多谢!
页:
[1]