parcel | Lucy |
class variable | LUCY_EASYANALYZER |
struct symbol | lucy_EasyAnalyzer |
class nickname | lucy_EasyAnalyzer |
header file | Lucy/Analysis/EasyAnalyzer.h |
Lucy::Analysis::EasyAnalyzer – A simple analyzer chain.
EasyAnalyzer is an analyzer chain consisting of a StandardTokenizer, a Normalizer, and a SnowballStemmer.
Supported languages:
en => English,
da => Danish,
de => German,
es => Spanish,
fi => Finnish,
fr => French,
hu => Hungarian,
it => Italian,
nl => Dutch,
no => Norwegian,
pt => Portuguese,
ro => Romanian,
ru => Russian,
sv => Swedish,
tr => Turkish,
lucy_EasyAnalyzer* // incremented
lucy_EasyAnalyzer_new(
cfish_String *language
);
Create a new EasyAnalyzer.
An ISO code from the list of supported languages.
lucy_EasyAnalyzer*
lucy_EasyAnalyzer_init(
lucy_EasyAnalyzer *self,
cfish_String *language
);
Initialize an EasyAnalyzer.
An ISO code from the list of supported languages.
lucy_Inversion* // incremented
lucy_EasyAnalyzer_Transform(
lucy_EasyAnalyzer *self,
lucy_Inversion *inversion
);
Take a single Inversion as input and returns an Inversion, either the same one (presumably transformed in some way), or a new one.
An inversion.
lucy_Inversion* // incremented
lucy_EasyAnalyzer_Transform_Text(
lucy_EasyAnalyzer *self,
cfish_String *text
);
Kick off an analysis chain, creating an Inversion from string input. The default implementation simply creates an initial Inversion with a single Token, then calls Transform(), but occasionally subclasses will provide an optimized implementation which minimizes string copies.
A string.
cfish_Hash* // incremented
lucy_EasyAnalyzer_Dump(
lucy_EasyAnalyzer *self
);
Dump the analyzer as hash.
Subclasses should call Dump() on the superclass. The returned object is a hash which should be populated with parameters of the analyzer.
Returns: A hash containing a description of the analyzer.
lucy_EasyAnalyzer* // incremented
lucy_EasyAnalyzer_Load(
lucy_EasyAnalyzer *self,
cfish_Obj *dump
);
Reconstruct an analyzer from a dump.
Subclasses should first call Load() on the superclass. The
returned object is an analyzer which should be reconstructed by
setting the dumped parameters from the hash contained in dump
.
Note that the invocant analyzer is unused.
A hash.
Returns: An analyzer.
bool
lucy_EasyAnalyzer_Equals(
lucy_EasyAnalyzer *self,
cfish_Obj *other
);
Indicate whether two objects are the same. By default, compares the memory address.
Another Obj.
cfish_Vector* // incremented
lucy_EasyAnalyzer_Split(
lucy_EasyAnalyzer *self,
cfish_String *text
);
Analyze text and return an array of token texts.
A string.
Lucy::Analysis::EasyAnalyzer is a Lucy::Analysis::Analyzer is a Clownfish::Obj.
Copyright © 2010-2015 The Apache Software Foundation, Licensed under the
Apache License, Version 2.0.
Apache Lucy, Lucy, Apache, the Apache feather logo, and the Apache Lucy project logo are trademarks of The
Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their
respective owners.