marytts.features
Class MaryLanguageFeatureProcessors.WordFrequency
java.lang.Object
marytts.features.MaryLanguageFeatureProcessors.WordFrequency
- All Implemented Interfaces:
- ByteValuedFeatureProcessor, MaryFeatureProcessor
- Enclosing class:
- MaryLanguageFeatureProcessors
public static class MaryLanguageFeatureProcessors.WordFrequency
- extends java.lang.Object
- implements ByteValuedFeatureProcessor
|
Method Summary |
java.lang.String |
getName()
|
java.lang.String[] |
getValues()
List the possible values of the feature processor, as
clear-text values. |
byte |
process(Target target)
Performs some processing on the given item. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
navigator
protected MaryGenericFeatureProcessors.TargetElementNavigator navigator
values
protected ByteStringTranslator values
wordFrequencies
protected FSTLookup wordFrequencies
MaryLanguageFeatureProcessors.WordFrequency
public MaryLanguageFeatureProcessors.WordFrequency(java.lang.String fstFilename,
java.lang.String encoding)
getName
public java.lang.String getName()
- Specified by:
getName in interface MaryFeatureProcessor
getValues
public java.lang.String[] getValues()
- Description copied from interface:
ByteValuedFeatureProcessor
- List the possible values of the feature processor, as
clear-text values. Byte values as returned by process()
can be translated into their string equivalent by using
the byte value as an index in the String[] returned.
- Specified by:
getValues in interface ByteValuedFeatureProcessor
- Returns:
- an array containing the possible return values
of this feature processor, in String representation.
process
public byte process(Target target)
- Performs some processing on the given item.
- Specified by:
process in interface ByteValuedFeatureProcessor
- Parameters:
target - the target to process
- Returns:
- the frequency of the current word, on a ten-point scale
from 0=unknown=very rare to 9=very frequent.