Interface InvertedIndex.DocumentDistanceMeasurer<DOCUMENT_TYPE,​KEY_TYPE>

  • Type Parameters:
    DOCUMENT_TYPE - the type of the documents to index.
    KEY_TYPE - the look-up-able part of the document.
    All Known Implementing Classes:
    VectorDocumentDistanceMeasurer
    Enclosing class:
    InvertedIndex<DOCUMENT_TYPE,​KEY_TYPE>

    public static interface InvertedIndex.DocumentDistanceMeasurer<DOCUMENT_TYPE,​KEY_TYPE>
    Measurer that measures distance of two documents.
    • Method Detail

      • measure

        double measure​(DOCUMENT_TYPE reference,
                       java.util.Set<KEY_TYPE> referenceKeys,
                       DOCUMENT_TYPE doc,
                       java.util.Set<KEY_TYPE> docKeys)
        Measures the distance (value between 0.0 and 1.0) between a reference document and a candidate document.
        Parameters:
        reference - the reference document.
        referenceKeys - the reference document key parts.
        doc - the candidate document.
        docKeys - the candidate document key parts.
        Returns:
        a value between 0d and 1d where 0d is most similar.