Skip to content

KeyPhrase count is always one #4

@endintiers

Description

@endintiers

Because count++ happens AFTER the count is updated.
The bit of code that counts how many time we have seen a keyphrase should be:
int count;
if (keyPhrases.TryGetValue(keyPhrase.ToLower(), out count))
{
count++;
keyPhrases[keyPhrase.ToLower()] = count;
}
That will make the sample MUCH better.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions