ModErn Text Analysis
META Enumerates Textual Applications
Main Page
Related Pages
Namespaces
Classes
Files
File List
File Members
include
analyzers
ngram
ngram_word_analyzer.h
Go to the documentation of this file.
1
9
#ifndef META_NGRAM_WORD_ANALYZER_H_
10
#define META_NGRAM_WORD_ANALYZER_H_
11
12
#include "
analyzers/analyzer_factory.h
"
13
#include "
analyzers/ngram/ngram_analyzer.h
"
14
#include "
util/clonable.h
"
15
16
namespace
meta
17
{
18
namespace
analyzers
19
{
20
24
class
ngram_word_analyzer
25
:
public
util::multilevel_clonable
<analyzer, ngram_analyzer,
26
ngram_word_analyzer>
27
{
28
using
base
=
util::multilevel_clonable
<
analyzer
,
ngram_analyzer
,
29
ngram_word_analyzer
>;
30
31
public
:
37
ngram_word_analyzer
(uint16_t n, std::unique_ptr<token_stream> stream);
38
43
ngram_word_analyzer
(
const
ngram_word_analyzer& other);
44
49
virtual
void
tokenize
(
corpus::document
& doc)
override
;
50
52
const
static
std::string
id
;
53
54
private
:
56
std::unique_ptr<token_stream>
stream_
;
57
};
58
62
template
<>
63
std::unique_ptr<analyzer>
64
make_analyzer<ngram_word_analyzer>
(
const
cpptoml::table&,
65
const
cpptoml::table&);
66
}
67
}
68
#endif
meta::analyzers::ngram_word_analyzer
Analyzes documents using their tokenized words.
Definition:
ngram_word_analyzer.h:24
meta::analyzers::make_analyzer< ngram_word_analyzer >
std::unique_ptr< analyzer > make_analyzer< ngram_word_analyzer >(const cpptoml::table &, const cpptoml::table &)
Specialization of the factory method for creating ngram_word_analyzers.
Definition:
ngram_word_analyzer.cpp:55
meta::analyzers::ngram_word_analyzer::id
static const std::string id
Identifier for this analyzer.
Definition:
ngram_word_analyzer.h:52
ngram_analyzer.h
meta::analyzers::ngram_word_analyzer::tokenize
virtual void tokenize(corpus::document &doc) override
Tokenizes a file into a document.
Definition:
ngram_word_analyzer.cpp:34
analyzer_factory.h
meta::analyzers::ngram_word_analyzer::stream_
std::unique_ptr< token_stream > stream_
The token stream to be used for extracting tokens.
Definition:
ngram_word_analyzer.h:56
meta::util::multilevel_clonable
Template class to facilitate polymorphic cloning.
Definition:
clonable.h:28
clonable.h
meta::corpus::document
Represents an indexable document.
Definition:
document.h:31
meta
The ModErn Text Analysis toolkit is a suite of natural language processing, classification, information retreival, data mining, and other applications of text processing.
Definition:
analyzer.h:24
meta::analyzers::analyzer
An class that provides a framework to produce token counts from documents.
Definition:
analyzer.h:41
meta::analyzers::ngram_word_analyzer::ngram_word_analyzer
ngram_word_analyzer(uint16_t n, std::unique_ptr< token_stream > stream)
Constructor.
Definition:
ngram_word_analyzer.cpp:21
meta::analyzers::ngram_analyzer
Analyzes documents based on an ngram word model, where the value for n is supplied by the user...
Definition:
ngram_analyzer.h:27
Generated on Tue Mar 3 2015 23:20:16 for ModErn Text Analysis by
1.8.9.1