Class DummyItem

  • All Implemented Interfaces:
    Similar<DummyItem>

    public class DummyItem
    extends Object
    implements Similar<DummyItem>
    Just a dumb item to test whether or not LexRank actually works. It simulates having a similarity function by just reading a value out of some similarity matrix. If you're using multiple of these, it's probably best to make sure they all point to the same matrix, or hilarity could ensue.
    • Field Detail

      • id

        public int id
    • Constructor Detail

      • DummyItem

        public DummyItem​(int id,
                         double[][] similarityMatrix)
    • Method Detail

      • similarity

        public double similarity​(DummyItem other)
        Description copied from interface: Similar
        Compute some meaurement of similarity between this object and some other object. Returned similarity values should be in the range [0, 1] where a similarity of 0 means that the two objects are completely different, and a similarity of 1 means they are both the same. Additionally, this operation should be symmetric, that is, a.similarity(b) should equal b.similarity(a).
        Specified by:
        similarity in interface Similar<DummyItem>