From 2aba117efb3001af25e8a969e3567e44dbd91709 Mon Sep 17 00:00:00 2001 From: Abdullah Atta Date: Fri, 11 Nov 2022 11:06:30 +0500 Subject: [PATCH] chore: add license header for rust-stem stemmer --- src/lang/en.rs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/src/lang/en.rs b/src/lang/en.rs index 3a9f1af..582b0aa 100644 --- a/src/lang/en.rs +++ b/src/lang/en.rs @@ -57,10 +57,6 @@ fn trimmer(token: String) -> Option { ) } -// 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; @@ -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