-
Notifications
You must be signed in to change notification settings - Fork 0
Text rakeoptions gethashcode
github-actions[bot] edited this page Sep 21, 2026
·
21 revisions
Development build. This page describes
main, not a released package. The latest published Lodestar.Text is 0.6.0 — read its documentation.
Home › Text › Keyword extraction
A hash consistent with the equality, in constant time.
public int GetHashCode()Returns — a hash over the scalars and whether stop words are present.
Example — options equal as sets hash alike.
using Lodestar.Text.Keywords;
RakeOptions left = new() { StopWords = ["the", "the", "a"] };
RakeOptions right = new() { StopWords = ["a", "the"] };
bool alike = left.GetHashCode() == right.GetHashCode(); // => TrueRemarks — the stop words contribute only their presence, never their count. Set equality
makes ["the", "the"] equal ["the"] while the counts differ, and equal objects must hash
alike; hashing the words themselves would be the walk this avoids.
Applies to — net10.0, netstandard2.0.
See also — RakeOptions.Equals, RakeOptions.