From 5e07ea79c233c7354e33eeabebf4612fa35c02d0 Mon Sep 17 00:00:00 2001 From: Vincent Herlemont Date: Wed, 7 Sep 2022 20:54:31 +0200 Subject: [PATCH 1/2] Make charabia default feature optional --- milli/Cargo.toml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/milli/Cargo.toml b/milli/Cargo.toml index 421a7f839..8e87b1616 100644 --- a/milli/Cargo.toml +++ b/milli/Cargo.toml @@ -9,7 +9,7 @@ bimap = { version = "0.6.2", features = ["serde"] } bincode = "1.3.3" bstr = "0.2.17" byteorder = "1.4.3" -charabia = "0.6.0" +charabia = { version = "0.6.0", default-features = false } concat-arrays = "0.1.2" crossbeam-channel = "0.5.2" either = "1.6.1" @@ -57,4 +57,4 @@ md5 = "0.7.0" rand = "0.8.5" [features] -default = [] +default = [ "charabia/default" ] \ No newline at end of file From 8cd5200f48b5be9629cc7107aebdcc06bcf27d73 Mon Sep 17 00:00:00 2001 From: Vincent Herlemont Date: Thu, 8 Sep 2022 12:19:44 +0200 Subject: [PATCH 2/2] Make charabia languages configurable --- milli/Cargo.toml | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/milli/Cargo.toml b/milli/Cargo.toml index 8e87b1616..016711198 100644 --- a/milli/Cargo.toml +++ b/milli/Cargo.toml @@ -57,4 +57,16 @@ md5 = "0.7.0" rand = "0.8.5" [features] -default = [ "charabia/default" ] \ No newline at end of file +default = [ "charabia/default" ] + +# allow chinese specialized tokenization +chinese = ["charabia/chinese"] + +# allow hebrew specialized tokenization +hebrew = ["charabia/hebrew"] + +# allow japanese specialized tokenization +japanese = ["charabia/japanese"] + +# allow thai specialized tokenization +thai = ["charabia/thai"]