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]

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 accepted, however they will not give a nice feature-value mapping when using as_map.

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.

The feature map is constructed lazily:

  • If as_map is never called, the feature map is never created.
  • If as_map is called once or more, the feature map is only created once.

Get the features field.

Trait Implementations

impl Clone for Features
[src]

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

impl Debug for Features
[src]

Formats the value using the given formatter.

impl Display for Features
[src]

Formats the value using the given formatter. Read more

impl PartialEq for Features
[src]

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.