mirror of
https://github.com/guillaume-be/rust-bert.git
synced 2024-08-16 16:10:25 +03:00
Generalize input of NERModel::predict_full_entities (#329)
This commit is contained in:
parent
e1e8fc615d
commit
80e0197e2c
@ -274,7 +274,10 @@ impl NERModel {
|
||||
/// ]]
|
||||
/// # ;
|
||||
/// ```
|
||||
pub fn predict_full_entities(&self, input: &[&str]) -> Vec<Vec<Entity>> {
|
||||
pub fn predict_full_entities<S>(&self, input: &[S]) -> Vec<Vec<Entity>>
|
||||
where
|
||||
S: AsRef<str>,
|
||||
{
|
||||
let tokens = self.token_classification_model.predict(input, true, false);
|
||||
let mut entities: Vec<Vec<Entity>> = Vec::new();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user