所以我仍然在努力遵循这样的:http://code.google.com/p/dkpro-core-asl/wiki/MyFirstDKProProject的Eclipse /蚂蚁MD5不匹配任何其他MD5
我是在坚持用很奇怪的MD5麻烦另一个地方,我不明白为什么我的Eclipse /蚂蚁计算不同的md5比md5我可以通过使用md5sum(cygwin)或Python来计算!
的Eclipse /蚂蚁消息:
BUILD FAILED
D:\eclipseWorkspace\maven.1334761781732\branches\1.2.x\de.tudarmstadt.ukp.dkpro.core.treetagger\src\scripts\build.xml:34: The following error occurred while executing this line:
D:\eclipseWorkspace\maven.1334761781732\branches\1.2.x\de.tudarmstadt.ukp.dkpro.core.treetagger\src\scripts\build.xml:311: The following error occurred while executing this line:
D:\eclipseWorkspace\maven.1334761781732\branches\1.2.x\de.tudarmstadt.ukp.dkpro.core.treetagger\src\scripts\build.xml:451: MD5 checksum mismatch for [la-tagger-little-endian.par].
Please verify the checksum and if necessary update this script.
Expected: f959f8633ef842f069f0331ad19dc8b4
Actual : bde1f6a63b2c5a658ba25a8eb90832a8
OK,这是后话可以作为文件可以在FTP已经改变,这里是蚂蚁的build.xml文件的一部分:
<target name="la">
<property name="version.la" value="2011050700"/>
<install-model-file url="ftp://ftp.ims.uni-stuttgart.de/pub/corpora/latin-par-linux-3.2.bin.gz"
type="tagger" endianness="little-endian" language="la" encoding="ISO-8859-1"
md5="f959f8633ef842f069f0331ad19dc8b4"/>
</target>
里的东西只是去怪对我来说是有::使用Cygwin(AFER手动下载通过FTP与FileZilla中,二进制模式或自动的文件,当然不是ASCII)
$ md5sum latin-par-linux-3.2.bin.gz
e77493eed28857bf93aca91c2a6e5a9b *latin-par-linux-3.2.bin.gz
使用python:
import urllib
import hashlib
data = urllib.urlopen("ftp://ftp.ims.uni-stuttgart.de/pub/corpora/latin-par-linux-3.2.bin.gz").read()
md5 = hashlib.md5()
md5.update(data)
print md5.hexdigest()
e77493eed28857bf93aca91c2a6e5a9b
或
def md5_for_file(filePath):
md5 = hashlib.md5()
file = open(filePath, 'rb')
while True:
data = file.read(8192)
if not data:
break
md5.update(data)
file.close()
return md5.hexdigest()
print md5_for_file(r"D:\ftp.ims.uni-stuttgart.de.pub.corpora.20120419\latin-par-linux-3.2.bin.gz")
e77493eed28857bf93aca91c2a6e5a9b
并且还使用从幅的免费软件来计算MD5,它们都相互匹配,但比所述一个ANT计算作为不同“实际”!
好吧,你是对的我是个笨蛋。我必须提取所有内容并计算由'file =“tree-tagger”'参数指定的文件的md5! 非常感谢。我对Eclipse/Ant/Maven的东西太陌生了...... – user1340802 2012-04-19 15:43:49