Skip to content

Commit

Permalink
chore: add license header for rust-stem stemmer
Browse files Browse the repository at this point in the history
  • Loading branch information
thecodrr committed Nov 11, 2022
1 parent 9ff3dd5 commit 2aba117
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/lang/en.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,6 @@ fn trimmer(token: String) -> Option<String> {
)
}

// This is a direct port of the stemmer from elasticlunr.js
// It's not very efficient and very not-rusty, but it
// generates identical output.

#[derive(Clone)]
struct Stemmer;

Expand All @@ -84,6 +80,14 @@ impl Stemmer {
}
}

/// This stemmer implementation is taken directly from rust-stem
/// (https://github.com/minhnhdo/rust-stem) which is licensed under the MIT
/// License as follows:
///
/// The MIT License (MIT)
///
/// Copyright (c) 2013 Do Nhat Minh
/// Member b is a vector of bytes holding a word to be stemmed.
/// The letters are in b[0], b[1] ... ending at b[z->k]. Member k is readjusted
/// downwards as the stemming progresses. Zero termination is not in fact used
Expand Down

0 comments on commit 2aba117

Please sign in to comment.