Evaluates the new shingle token weight.
for (shingle part token in shingle)
weight += shingle part token weight * (1 / sqrt(all shingle part token weights summed))
This algorithm gives a slightly greater score for longer shingles
and is rather penalising to great shingle token part weights.
Namespace: Lucene.Net.Analyzers.ShingleAssembly: Lucene.Net.Contrib.Analyzers (in Lucene.Net.Contrib.Analyzers.dll) Version: 2.9.2.1 (2.9.2.1)
Syntax
Visual Basic |
---|
Public Function CalculateShingleWeight ( _
shingleToken As Token, _
shingle As List(Of Token), _
currentPermutationStartOffset As Integer, _
currentPermutationRows As List(Of Row), _
currentPermuationTokens As List(Of Token) _
) As Single |
Visual C++ |
---|
public:
float CalculateShingleWeight(
Token^ shingleToken,
List<Token^>^ shingle,
int currentPermutationStartOffset,
List<Row^>^ currentPermutationRows,
List<Token^>^ currentPermuationTokens
) |
Return Value
weight to be set for parameter shingleToken
See Also