Class SimpleSimilarityResult
java.lang.Object
de.uni_trier.wi2.procake.retrieval.SimpleSimilarityResult
- All Implemented Interfaces:
Iterable<IdSimilarityPair>
This class is meant to be a lightweight version of the retrieval result with only a query id and
a list of cases with their respective similarity.
- Author:
- Maximilian Hoffmann
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
addCase
(IdSimilarityPair pair) void
static List<SimpleSimilarityResult>
fromMultiKeyMap
(org.apache.commons.collections4.map.MultiKeyMap<String, Double> multiKeyMap) Create a simple similarity result from a multi-key map (usually from parsed CSV).static SimpleSimilarityResult
fromRetrievalResultList
(RetrievalResultList retrievalResultList) Create a simple similarity result from a retrieval result list.@NotNull Iterator<IdSimilarityPair>
iterator()
int
size()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
SimpleSimilarityResult
-
-
Method Details
-
fromRetrievalResultList
public static SimpleSimilarityResult fromRetrievalResultList(RetrievalResultList retrievalResultList) Create a simple similarity result from a retrieval result list.- Parameters:
retrievalResultList
- the retrieval result list to transform- Returns:
- the transformed result
-
fromMultiKeyMap
public static List<SimpleSimilarityResult> fromMultiKeyMap(org.apache.commons.collections4.map.MultiKeyMap<String, Double> multiKeyMap) Create a simple similarity result from a multi-key map (usually from parsed CSV).- Parameters:
multiKeyMap
- a multi-key map (first key: query, second key: case, value: similarity)- Returns:
- the transformed result
-
addCase
-
addCase
-
getQueryID
-
getCaseSimilarities
-
size
public int size() -
iterator
- Specified by:
iterator
in interfaceIterable<IdSimilarityPair>
-