public class NickNameManager extends Object
| Constructor and Description |
|---|
NickNameManager(String nicknameFileName,
float confThres)
Constructor to initialize a NickNameManager object.
|
| Modifier and Type | Method and Description |
|---|---|
ArrayList<String> |
getNickNameMapping(String text)
Finds all possible nicknames for the string parameter.
|
boolean |
isNickName(String text)
Checks if the string parameter is a valid nickname.
|
void |
readNicknameFile()
Reads the given file and stores nicknames in a HashMap.
|
ArrayList<String> |
replaceNickNames(String text)
Adds a new nickname or replaces an old one.
|
public NickNameManager(String nicknameFileName, float confThres) throws NumberFormatException, IOException
nicknameFileName - File name to obtain list of nickname stringsconfThres - Threshold for confidence of whether a string is a nicknameNumberFormatExceptionIOExceptionpublic void readNicknameFile()
throws NumberFormatException,
IOException
NumberFormatExceptionIOExceptionpublic boolean isNickName(String text)
text - String to be checked for nicknamepublic ArrayList<String> getNickNameMapping(String text)
text - String to find the nickname mapping for from the HashMapCopyright © 2017. All rights reserved.