Skip to content

Commit

Permalink
Shorten the heliport-model imports
Browse files Browse the repository at this point in the history
  • Loading branch information
ZJaume committed Oct 31, 2024
1 parent beef29f commit 03fa1fc
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 5 deletions.
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::path::PathBuf;

use anyhow::Result;

use heliport_model::languagemodel::binarize;
use heliport_model::binarize;

fn main() -> Result<()> {
let mut model_path = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
Expand Down
3 changes: 3 additions & 0 deletions heliport-model/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
pub mod languagemodel;
pub mod lang;

pub use crate::languagemodel::{Model, ModelNgram, OrderNgram, binarize};
pub use crate::lang::{Lang, LangScores, LangBitmap};
2 changes: 1 addition & 1 deletion src/cli/binarize.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use clap::Args;
use log::{error, warn};
use pyo3::prelude::*;

use heliport_model::languagemodel::{binarize, OrderNgram};
use heliport_model::{binarize, OrderNgram};
use crate::utils::Abort;
use crate::python::module_path;

Expand Down
2 changes: 1 addition & 1 deletion src/cli/identify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use itertools::Itertools;
use log::{debug};
use pyo3::prelude::*;

use heliport_model::lang::Lang;
use heliport_model::Lang;
use crate::identifier::Identifier;
use crate::utils::Abort;
use crate::python::module_path;
Expand Down
4 changes: 2 additions & 2 deletions src/identifier.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ use rayon::prelude::*;
#[cfg(feature = "python")]
use pyo3::pyclass;

use heliport_model::languagemodel::Model;
use heliport_model::lang::{Lang, LangScores, LangBitmap};
use heliport_model::Model;
use heliport_model::{Lang, LangScores, LangBitmap};
use crate::utils::is_cjk_block;

lazy_static! {
Expand Down

0 comments on commit 03fa1fc

Please sign in to comment.