ModErn Text Analysis
META Enumerates Textual Applications
Public Member Functions | Static Public Attributes | Private Member Functions | Private Attributes | List of all members
meta::analyzers::filters::icu_filter Class Reference

Filter that applies an ICU transliteration to each token in the sequence. More...

#include <icu_filter.h>

Inheritance diagram for meta::analyzers::filters::icu_filter:
meta::util::multilevel_clonable< Root, Base, Derived >

Public Member Functions

 icu_filter (std::unique_ptr< token_stream > source, const std::string &id)
 Constructs an icu_filter which reads tokens from the given source, using a utf::transformer constructed with the specified id. More...
 
 icu_filter (const icu_filter &other)
 Copies an icu_filter. More...
 
void set_content (const std::string &content) override
 Sets the content for the beginning of the filter chain. More...
 
std::string next () override
 
 operator bool () const override
 Determines whether there are more tokens available in the stream.
 
- Public Member Functions inherited from meta::util::multilevel_clonable< Root, Base, Derived >
virtual std::unique_ptr< Root > clone () const
 Clones the given object. More...
 

Static Public Attributes

static const std::string id = "icu"
 Identifier for this filter.
 

Private Member Functions

void next_token ()
 Finds the next valid token for this filter.
 

Private Attributes

std::unique_ptr< token_streamsource_
 The source to read tokens from.
 
utf::transformer trans_
 The transformer to use.
 
util::optional< std::string > token_
 Current token (if available)
 

Detailed Description

Filter that applies an ICU transliteration to each token in the sequence.

Constructor & Destructor Documentation

meta::analyzers::filters::icu_filter::icu_filter ( std::unique_ptr< token_stream source,
const std::string &  id 
)

Constructs an icu_filter which reads tokens from the given source, using a utf::transformer constructed with the specified id.

Parameters
sourceWhere to read tokens from
idTo specify which utf::transformer to use
meta::analyzers::filters::icu_filter::icu_filter ( const icu_filter other)

Copies an icu_filter.

Parameters
otherThe other filter to copy from

Member Function Documentation

void meta::analyzers::filters::icu_filter::set_content ( const std::string &  content)
override

Sets the content for the beginning of the filter chain.

Parameters
contentThe string content to set
std::string meta::analyzers::filters::icu_filter::next ( )
override
Returns
the next token in the sequence.

The documentation for this class was generated from the following files: