add typescript and javascript stop words

support-stop-sequences
Meng Zhang 2023-06-06 15:50:42 -07:00
parent 54901515ef
commit 030f694261
1 changed files with 16 additions and 0 deletions

View File

@ -7,6 +7,22 @@ lazy_static! {
static ref LANGUAGES: HashMap<&'static str, Vec<&'static str>> = { static ref LANGUAGES: HashMap<&'static str, Vec<&'static str>> = {
let mut map = HashMap::new(); let mut map = HashMap::new();
map.insert("python", vec!["\n\n", "\ndef", "\n#", "\nfrom", "\nclass"]); map.insert("python", vec!["\n\n", "\ndef", "\n#", "\nfrom", "\nclass"]);
map.insert(
"javascript",
vec!["\n\n", "\nfunction", "\n//", "\nimport", "\nclass"],
);
map.insert(
"typescript",
vec![
"\n\n",
"\nfunction",
"\n//",
"\nimport",
"\nclass",
"\ninterface",
"\ntype",
],
);
map map
}; };
} }