documentScorer
The document​Scorer:​*
components compute scores for documents based on different criteria. In
combination with the documents:​scored
stage, you can select top-scoring documents based on the criteria of your choice.
You can use the following document​Scorer:​*
components in your analysis requests:
-
document​Scorer:​by​Document​Neighbors
-
For each input document, computes the document's neighbors (similar documents) and aggregates the neighbors' weights to compute the score of the input document.
-
document​Scorer:​by​Values
-
For each input document, counts the values collected by the value collector you provide.
-
document​Scorer:​by​Vector​Similarity
-
Scores documents by their similarity to the vector you provide.
document​Scorer:​reference
-
References a
document​Scorer:​*
component defined in the request or in the project's default components.
document​Scorer:​by​Document​Neighbors
For each input document, computes the document's neighbors (similar documents) and aggregates the neighbors' weights to compute the score of the input document.
{
"type": "documentScorer:byDocumentNeighbors",
"documentNeighbors": {
"type": "documentNeighbors:reference",
"auto": true
},
"threads": "auto",
"weightAggregation": "COUNT"
}
You can use the
document​Neighbors:​by​Query
component to generate document neighbors based on search queries specific to each input document.
document​Neighbors
The component to generate neighbors (similar documents) of each input document.
limit
The maximum number of neighbors to request for each input document.
threads
Controls the number of threads Lingo4G uses to compute document neighbors.
weight​Aggregation
The aggregation function Lingo4G uses to compute the document score based on the scores of the input document's neighbors.
See weight​Aggregation
documentation for the available options.
document​Scorer:​by​Values
For each input document, counts the values collected by the value collector you provide. The number of values becomes the document's score.
{
"type": "documentScorer:byValues",
"threads": "auto",
"unique": false,
"valueCollector": null
}
threads
The number of processing threads to use.
unique
If true
, the scorer counts the number of unique values returned by the collector.
value​Collector
The collector to use for collecting the values to count.
document​Scorer:​by​Vector​Similarity
Scores documents by their similarity to the vector you provide.
{
"type": "documentScorer:byVectorSimilarity",
"vector": {
"type": "vector:reference",
"auto": true
},
"vectors": {
"type": "vectors:reference",
"auto": true
}
}
vector
The vector against which to score the documents.
vectors
Vectors corresponding to the documents you want to score.
document​Scorer:​*
Consumers of
The following stages and components take document​Scorer:​*
as
input:
Stage or component | Property |
---|---|
documents:​scored | scorer |