所以我仍然在努力遵循這樣的: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