public class PhoneSetImpl extends java.lang.Object implements PhoneSet
PhoneSet
that reads the info from
a file. The format of the file is as follows:
phone feature value phone feature value phone feature value ...Where
phone
is the phone name, feature
is
the phone feature such as "vc," "vlng," "vheight," and so on, and
"value" is the value of the feature. There can be multiple lines
for the same phone to describe various features of that phone.Constructor and Description |
---|
PhoneSetImpl(java.net.URL url)
Create a new
PhoneSetImpl by reading from the
given URL. |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
getPhoneFeature(java.lang.String phone,
java.lang.String featureName)
Given a phoneme and a feature name, returns the feature.
|
public PhoneSetImpl(java.net.URL url) throws java.io.IOException
PhoneSetImpl
by reading from the
given URL.url
- the input sourcejava.io.IOException
- if an error occurspublic java.lang.String getPhoneFeature(java.lang.String phone, java.lang.String featureName)
getPhoneFeature
in interface PhoneSet
phone
- the phoneme of interestfeatureName
- the name of the feature of interest