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

The multi_analyzer class contains more than one analyzer. More...

#include <multi_analyzer.h>

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

Public Member Functions

 multi_analyzer (std::vector< std::unique_ptr< analyzer >> &&toks)
 Constructs a multi_analyzer from a vector of other analyzers. More...
 
 multi_analyzer (const multi_analyzer &other)
 Copy constructor. More...
 
virtual void tokenize (corpus::document &doc) override
 Tokenizes a file into a document. More...
 
- Public Member Functions inherited from meta::util::multilevel_clonable< Root, Base, Derived >
virtual std::unique_ptr< Root > clone () const
 Clones the given object. More...
 

Private Attributes

std::vector< std::unique_ptr< analyzer > > analyzers_
 Holds all the analyzers in this multi_analyzer.
 

Detailed Description

The multi_analyzer class contains more than one analyzer.

This is useful for trying combined feature methods.

For example, you could tokenize based on ngrams of words and parse tree rewrite rules. The multi_analyzer keeps track of all the features in one set for however many internal analyzers it contains.

Constructor & Destructor Documentation

meta::analyzers::multi_analyzer::multi_analyzer ( std::vector< std::unique_ptr< analyzer >> &&  toks)

Constructs a multi_analyzer from a vector of other analyzers.

Parameters
toksA vector of analyzers to combine features from
meta::analyzers::multi_analyzer::multi_analyzer ( const multi_analyzer other)

Copy constructor.

Parameters
otherThe other multi_analyzer to copy from

Member Function Documentation

void meta::analyzers::multi_analyzer::tokenize ( corpus::document doc)
overridevirtual

Tokenizes a file into a document.

Parameters
docThe document to store the tokenized information in

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