[Fasttran-checkins] fasttran/fasttran tm.py,1.2,1.3
Status: Alpha
Brought to you by:
a1s
From: alexander s. <a1...@us...> - 2007-02-28 09:53:42
|
Update of /cvsroot/fasttran/fasttran/fasttran In directory sc8-pr-cvs5.sourceforge.net:/tmp/cvs-serv4846 Modified Files: tm.py Log Message: .store: ignore the pair if source and target are the same Index: tm.py =================================================================== RCS file: /cvsroot/fasttran/fasttran/fasttran/tm.py,v retrieving revision 1.2 retrieving revision 1.3 diff -C2 -d -r1.2 -r1.3 *** tm.py 20 Feb 2007 06:48:07 -0000 1.2 --- tm.py 28 Feb 2007 09:53:40 -0000 1.3 *************** *** 26,29 **** --- 26,30 ---- """ """History (most recent first): + 28-feb-2007 [als] .store: ignore the pair if source and target are the same 20-feb-2007 [als] use pickle protocol version 2; added TM meta information *************** *** 365,368 **** --- 366,372 ---- sentence = self.normalize_source(sentence)[1] translation = self.normalize_source(translation)[1] + # ignore if source and target are the same + if sentence == translation: + return _id = self._db_strings.get(sentence.encode("utf-8"), None) if _id is None: |