diff options
| author | tslil clingman <tslil@posteo.de> | 2022-10-17 23:13:48 +0200 |
|---|---|---|
| committer | tslil clingman <tslil@posteo.de> | 2022-10-20 22:41:12 +0200 |
| commit | aa55ddbbf13ea8b2a259ad7a07490efe9dda57f5 (patch) | |
| tree | 8c9ea4eca46c3f1a4630933cc8e5531947f37c1d /srchr/src/corpus.rs | |
| parent | f3f8aa54db89283e1d92f798ba185162ce737e34 (diff) | |
correct skipgram computation
Diffstat (limited to 'srchr/src/corpus.rs')
| -rw-r--r-- | srchr/src/corpus.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/srchr/src/corpus.rs b/srchr/src/corpus.rs index 4428bc6..7216b1a 100644 --- a/srchr/src/corpus.rs +++ b/srchr/src/corpus.rs @@ -68,7 +68,7 @@ impl Corpus { if let Some(c) = current_char { if let Some(lc) = last_char { if let Some(llc) = last_last_char { - if llc != c { + if llc != lc && lc != c && llc != c { skipgram_count[pair_to_index(llc, c)] += 1; skipgram_count[pair_to_index(c, llc)] += 1; } |
