mirror of
https://github.com/moses-smt/mosesdecoder.git
synced 2024-12-28 14:32:38 +03:00
git-svn-id: https://mosesdecoder.svn.sourceforge.net/svnroot/mosesdecoder/trunk@1764 1f5c12ca-751b-0410-a591-d2e778427230
This commit is contained in:
parent
1f1f3449ac
commit
06a9cad575
@ -2,11 +2,10 @@ package org.statmt.hg4;
|
||||
|
||||
import java.util.BitSet;
|
||||
|
||||
public class Coverage {
|
||||
public class Coverage implements Comparable {
|
||||
BitSet coverage;
|
||||
|
||||
/**
|
||||
*
|
||||
* @param phraseSize
|
||||
* @param coverageStart
|
||||
* @param coverageEnd (exclusive)
|
||||
@ -48,4 +47,9 @@ public class Coverage {
|
||||
assert(this.coverage.size() == other.coverage.size());
|
||||
return !this.coverage.intersects(other.coverage);
|
||||
}
|
||||
|
||||
public int compareTo(Object o) {
|
||||
Coverage other = (Coverage) o;
|
||||
return this.coverage.cardinality() - other.coverage.cardinality();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user