public class HonorificManager extends Object
Modifier and Type | Field and Description |
---|---|
static String |
GENDER_EITHER |
static String |
GENDER_FEMALE |
static String |
GENDER_MALE |
Constructor and Description |
---|
HonorificManager(String honorificFileName)
Constructor to initialize a HonorificManager object, which is used to
determine if a string or a pair of strings should be assigned type PER.
|
Modifier and Type | Method and Description |
---|---|
boolean |
isHonorific(String str)
Returns true if the string parameter is a honorific.
|
boolean |
isMatching(String hono1,
String hono2) |
void |
readHonorificFile()
Reads the file and stores the list of known honorific strings in a
HashMap.
|
public static final String GENDER_EITHER
public static final String GENDER_MALE
public static final String GENDER_FEMALE
public HonorificManager(String honorificFileName) throws IOException
honorificFileName
- File name to obtain list of honorific stringsIOException
public void readHonorificFile() throws IOException
IOException
public boolean isHonorific(String str)
str
- String to be tested whether it is an honorific or notCopyright © 2017. All rights reserved.