Skip to content

Commit

Permalink
release: 0.17.14
Browse files Browse the repository at this point in the history
  • Loading branch information
ppodolsky committed Jul 27, 2023
1 parent a4a39ce commit c4664a8
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion summa-core/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "summa-core"
version = "0.17.13"
version = "0.17.14"
authors = ["Pasha Podolsky <ppodolsky@me.com>"]
edition = "2021"
license-file = "LICENSE"
Expand Down
1 change: 0 additions & 1 deletion summa-core/resources/drugs.csv
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
"autism","autism spectrum disorder","autism spectrum condition"
"foxp2","cagh44","spch1","tnrc10","forkhead box p2"
"levobupivacaine","chirocain","levobupivacaine hydrochloride","levobupivacaine hcl"
"(s)-nicardipine","(-)-nicardipine"
Expand Down
8 changes: 4 additions & 4 deletions summa-core/src/components/index_holder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ pub mod tests {

use crate::components::index_holder::register_default_tokenizers;
use crate::components::test_utils::{create_test_schema, generate_documents};
use crate::components::{IndexHolder, IndexWriterHolder};
use crate::components::IndexWriterHolder;
use crate::configs::core::WriterThreads;

#[test]
Expand Down Expand Up @@ -731,7 +731,7 @@ pub mod tests {
)?;
index_writer_holder.index_document(
doc!(
title_field => "CAGH44 gene (not CAGH45) can be correlated with autism disorder",
title_field => "CAGH44 gene (not CAGH45) can be correlated with autism disorder. Do not try to treat it with aspirin",
),
ConflictStrategy::Merge,
)?;
Expand All @@ -741,7 +741,7 @@ pub mod tests {
let searcher = reader.searcher();
let docs = searcher
.search(
&TermQuery::new(Term::from_field_text(concepts_field, "foxp2"), IndexRecordOption::Basic),
&TermQuery::new(Term::from_field_text(concepts_field, "acetylsalicylic acid"), IndexRecordOption::Basic),
&TopDocs::with_limit(10),
)?
.into_iter()
Expand All @@ -756,7 +756,7 @@ pub mod tests {
.unwrap()
})
.collect::<Vec<_>>();
assert_eq!(format!("{:?}", docs), "[\"CAGH44 gene (not CAGH45) can be correlated with autism disorder\"]");
assert_eq!(format!("{:?}", docs), "[\"CAGH44 gene (not CAGH45) can be correlated with autism disorder. Do not try to treat it with aspirin\"]");
Ok(())
}

Expand Down
10 changes: 4 additions & 6 deletions summa-core/src/components/tokenizers/dict_tokenizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,23 +130,21 @@ pub mod tests {
tokens.push(token.clone());
};
tokenizer
.token_stream("FOXP2 gene (not FOXP21) can be correlated with autism disorder or just autismo")
.token_stream("FOXP2 gene (not FOXP21) can be correlated with autism spectrum disorder or just autismo")
.process(&mut add_token);
}

assert_eq!(tokens.len(), 2);
assert_eq!(tokens.len(), 1);
assert_token(&tokens[0], 0, "foxp2", 0, 5);
assert_token(&tokens[1], 1, "autism", 47, 62);

let mut tokens: Vec<Token> = vec![];
{
let mut add_token = |token: &Token| {
tokens.push(token.clone());
};
tokenizer.token_stream("FOXP2ген связан с аутизмом (autism)").process(&mut add_token);
tokenizer.token_stream("FOXP2ген связан с аутизмом").process(&mut add_token);
}

assert_eq!(tokens.len(), 1);
assert_token(&tokens[0], 0, "autism", 46, 52);
assert_eq!(tokens.len(), 0);
}
}
6 changes: 3 additions & 3 deletions summa-embed-py/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "summa-embed-py"
version = "0.17.13"
version = "0.17.14"
edition = "2021"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
Expand All @@ -17,8 +17,8 @@ pyo3-asyncio = { version = "0.19", features = ["attributes", "tokio-runtime"] }
pyo3-log = "0.8"
pythonize = "0.19"
serde_json = "1.0"
summa-core = { version = "0.17.13", path = "../summa-core", default_features = false, features = ["fs", "hyper-external-request", "tokio-rt"] }
summa-server = { version = "0.17.13", path = "../summa-server", default_features = false }
summa-core = { version = "0.17.14", path = "../summa-core", default_features = false, features = ["fs", "hyper-external-request", "tokio-rt"] }
summa-server = { version = "0.17.14", path = "../summa-server", default_features = false }
summa-proto = { workspace = true }
tantivy = { workspace = true }
tokio = { workspace = true }
6 changes: 3 additions & 3 deletions summa-server/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
[package]
edition = "2021"
name = "summa-server"
version = "0.17.13"
version = "0.17.14"
license-file = "LICENSE"
description = "Fast full-text search server"
homepage = "https://github.com/izihawa/summa"
Expand Down Expand Up @@ -30,7 +30,7 @@ maintenance = { status = "actively-developed" }
tonic-build = { version = "0.9.1", default-features = false, features = ["prost", "transport"] }

[dev-dependencies]
summa-core = { version = "0.17.13", path = "../summa-core", features = ["fs", "hyper-external-request", "tokio-rt"] }
summa-core = { version = "0.17.14", path = "../summa-core", features = ["fs", "hyper-external-request", "tokio-rt"] }
tempdir = "0.3.7"

[dependencies]
Expand Down Expand Up @@ -59,7 +59,7 @@ serde = { workspace = true }
serde_derive = "1.0"
serde_json = { workspace = true }
serde_yaml = { workspace = true }
summa-core = { version = "0.17.13", path = "../summa-core", features = ["fs", "hyper-external-request", "tokio-rt"] }
summa-core = { version = "0.17.14", path = "../summa-core", features = ["fs", "hyper-external-request", "tokio-rt"] }
summa-proto = { workspace = true, features = ["grpc"] }
take_mut = { workspace = true }
tantivy = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion summa-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ prost = { workspace = true }
serde = { workspace = true }
serde-wasm-bindgen = "0.5"
strfmt = { workspace = true }
summa-core = { version = "0.17.13", path = "../summa-core", default_features = false }
summa-core = { version = "0.17.14", path = "../summa-core", default_features = false }
summa-proto = { workspace = true }
tantivy = { workspace = true, features = ["wasm"] }
thiserror = { workspace = true }
Expand Down

0 comments on commit c4664a8

Please sign in to comment.