Struct crfs::Model [−][src]
The CRF model
Implementations
impl<'a> Model<'a>
[src]
pub fn new(buf: &'a [u8]) -> Result<Self>
[src]
Create an instance of a model object from a model in memory
pub fn num_attrs(&self) -> u32
[src]
Number of attributes
pub fn num_labels(&self) -> u32
[src]
Number of labels
pub fn to_label(&self, lid: u32) -> Option<&str>
[src]
Convert a label ID to label string
pub fn to_label_id(&self, value: &str) -> Option<u32>
[src]
Convert a label string to label ID
pub fn to_attr(&self, aid: u32) -> Option<&str>
[src]
Convert a attribute ID to attribute string
pub fn to_attr_id(&self, value: &str) -> Option<u32>
[src]
Convert a attribute string to attribute ID
pub fn tagger(&'a self) -> Result<Tagger<'a>>
[src]
Get a new tagger
pub fn dump<W: Write>(&self, w: &mut W) -> Result<()>
[src]
Print the model in human-readable format
Trait Implementations
Auto Trait Implementations
impl<'a> RefUnwindSafe for Model<'a>
[src]
impl<'a> Send for Model<'a>
[src]
impl<'a> Sync for Model<'a>
[src]
impl<'a> Unpin for Model<'a>
[src]
impl<'a> UnwindSafe for Model<'a>
[src]
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
pub fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> ToOwned for T where
T: Clone,
[src]
T: Clone,
type Owned = T
The resulting type after obtaining ownership.
pub fn to_owned(&self) -> T
[src]
pub fn clone_into(&self, target: &mut T)
[src]
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
pub fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,