Skip to content

Commit

Permalink
Added 🇸🇰 Slovak
Browse files Browse the repository at this point in the history
Signed-off-by: Valerian Saliou <valerian@valeriansaliou.name>
  • Loading branch information
valeriansaliou committed Jun 27, 2020
1 parent bb156a1 commit 19412ce
Show file tree
Hide file tree
Showing 6 changed files with 451 additions and 20 deletions.
34 changes: 17 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ twox-hash = "1.5"
byteorder = "1.3"
hashbrown = "0.8"
linked_hash_set = "0.1"
whatlang = "0.8"
whatlang = "0.9"
regex = "1.3"

[target.'cfg(unix)'.dependencies]
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ Sonic can be used as a simple alternative to super-heavy and full-featured searc

A strong attention to performance and code cleanliness has been given when designing Sonic. It aims at being crash-free, super-fast and puts minimum strain on server resources (our measurements have shown that Sonic - when under load - responds to search queries in the μs range, eats ~30MB RAM and has a low CPU footprint; [see our benchmarks](https://github.com/valeriansaliou/sonic#how-fast--lightweight-is-it)).

_Tested at Rust version: `rustc 1.43.0 (4fb7144ed 2020-04-20)`_
_Tested at Rust version: `rustc 1.44.1 (c7087fe00 2020-06-17)`_

**🇫🇷 Crafted in Nantes, France.**

Expand Down Expand Up @@ -223,6 +223,7 @@ Sonic supports a wide range of languages in its lexing system. If a language is
* 🇵🇹 Portuguese
* 🇮🇳 Punjabi
* 🇷🇺 Russian
* 🇸🇰 Slovak
* 🇸🇮 Slovene
* 🇸🇴 Somali
* 🇪🇸 Spanish
Expand Down
5 changes: 4 additions & 1 deletion src/lexer/stopwords.rs
Original file line number Diff line number Diff line change
Expand Up @@ -123,13 +123,14 @@ lazy_static! {
static ref STOPWORDS_ILO: HashSet<&'static str> = make(ilo::STOPWORDS_ILO);
}

// Recursion group #9 (5 items)
// Recursion group #9 (6 items)
lazy_static! {
static ref STOPWORDS_RUN: HashSet<&'static str> = make(run::STOPWORDS_RUN);
static ref STOPWORDS_SNA: HashSet<&'static str> = make(sna::STOPWORDS_SNA);
static ref STOPWORDS_UIG: HashSet<&'static str> = make(uig::STOPWORDS_UIG);
static ref STOPWORDS_AFR: HashSet<&'static str> = make(afr::STOPWORDS_AFR);
static ref STOPWORDS_LAT: HashSet<&'static str> = make(lat::STOPWORDS_LAT);
static ref STOPWORDS_SLK: HashSet<&'static str> = make(slk::STOPWORDS_SLK);
}

fn make<'a>(words: &[&'a str]) -> HashSet<&'a str> {
Expand Down Expand Up @@ -290,6 +291,7 @@ impl LexerStopWord {
Lang::Uig => &*STOPWORDS_UIG,
Lang::Afr => &*STOPWORDS_AFR,
Lang::Lat => &*STOPWORDS_LAT,
Lang::Slk => &*STOPWORDS_SLK,
}
}

Expand Down Expand Up @@ -345,6 +347,7 @@ impl LexerStopWord {
Lang::Lav,
Lang::Est,
Lang::Lat,
Lang::Slk,
],
Script::Cyrillic => &[
Lang::Rus,
Expand Down
1 change: 1 addition & 0 deletions src/stopwords/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ pub mod run;
pub mod rus;
pub mod sin;
pub mod skr;
pub mod slk;
pub mod slv;
pub mod sna;
pub mod som;
Expand Down

0 comments on commit 19412ce

Please sign in to comment.