Struct conllx::Features
[−]
[src]
pub struct Features { /* fields omitted */ }
Token features.
In the CoNLL-X specification, these are morphological features of the token. Typically, the features are a list or a key-value mapping.
Methods
impl Features
[src]
fn from_string<S>(s: S) -> Self where
S: Into<String>,
S: Into<String>,
Create features from a string. The casual format uses key-value
pairs that are separated by a vertical bar (|
) and keys and
values using a colon (:
). Arbitrary strings will also be expected,
however they will not give a nice feature-value mapping when using
as_map
.
fn as_map(&self) -> BTreeMap<String, Option<String>>
Get the features field as a key-value mapping. This assumes that
the key-value pairs are separed using a vertical bar (|
) and keys
and values using a colon (:
). If the value is absent, corresponding
value in the mapping is None
.
fn as_str(&self) -> &str
Get the features field.
Trait Implementations
impl Clone for Features
[src]
fn clone(&self) -> Features
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0
Performs copy-assignment from source
. Read more
impl Debug for Features
[src]
impl PartialEq for Features
[src]
fn eq(&self, __arg_0: &Features) -> bool
This method tests for self
and other
values to be equal, and is used by ==
. Read more
fn ne(&self, __arg_0: &Features) -> bool
This method tests for !=
.