|
RiTa index |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Name | RiAnalyzer | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Description | Analyzes String phrases, annotating each phrase and
each contained word with 'feature' data. Default features
include: word-boundaries, pos, phonemes, stresses, syllables, etc.
String text = "The boy jumped over the wild dog.";
RiAnalyzer ra = new RiAnalyzer(this);
ra.analyze(text);
String phonemes = ra.getPhonemes();
String stresses = ra.getStresses();
String syllables = ra.getSyllables();
String partsOfSpeech = ra.getPos();
Note: RiString (and RiText) objects can also be analyzed:
RiString rt = new RiString("The boy ran to the store.");
ra.analyze(rt);
String phonemes = rt.getPhonemes();
And additional (custom) features can be added by the user
by creating a subclass and overriding the analyze method as
follows:
RiAnalyzer ra = new RiAnalyzer(this) {
public void analyze(RiText rt) {
super.analyze(rt);
// add custom features here
rt.addFeature("featureName", "featureValue");
}
}; |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Constructors | RiAnalyzer(pApplet); RiAnalyzer(pApplet, taggerType, enableCaching); RiAnalyzer(pApplet, enableCaching); |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Methods |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Usage | Web & Application |