Struct rust_bert::pipelines::pos_tagging::POSModel
source · pub struct POSModel { /* private fields */ }Expand description
Implementations§
source§impl POSModel
impl POSModel
sourcepub fn predict<S>(&self, input: &[S]) -> Vec<Vec<POSTag>> ⓘwhere
S: AsRef<str>,
pub fn predict<S>(&self, input: &[S]) -> Vec<Vec<POSTag>> ⓘwhere
S: AsRef<str>,
Extract entities from a text
Arguments
input-&[&str]Array of texts to extract entities from.
Returns
Vec<Vec<POSTag>>containing Part of Speech tags for the inputs provided
Example
let pos_model = POSModel::new(Default::default())?;
let input = [
"My name is Amy. I live in Paris.",
"Paris is a city in France.",
];
let output = pos_model.predict(&input);