public class EntityComparison extends Object
Modifier and Type | Field and Description |
---|---|
static String |
ACRONYMS_LIST |
static String |
COUNTRYLANG_LIST |
static String |
HONORIFIC_LIST |
static String |
LOCATION_LIST |
static String |
NICKNAMES_LIST |
static float |
NICKNAMES_THRES |
static String |
PEOPLE_LIST |
static float |
RATIO_THRES |
static String |
REASON |
static String |
SCORE |
static String |
SHORTCUTS_LIST |
static String |
TERMINATION |
Constructor and Description |
---|
EntityComparison()
No-arg constructor that initializes all helper classes with appropriate
files and sets the default values for score and reason.
|
Modifier and Type | Method and Description |
---|---|
HashMap<String,String> |
compare(HashMap<String,String> mapNames)
Primary method invoked by the user to initiate comparison of two strings.
|
void |
compare(String name1,
String name2)
Primary helper compare function that converts the comparable strings into
NameInfo objects.
|
HashMap<String,String> |
compareNames(String name1,
String name2)
Helper function invoked by HashMap
|
List<String> |
getAbbreviations(String longName) |
List<String> |
getLongForms(String acronym) |
String |
getReason()
Gets reason of the two strings currently being compared.
|
float |
getScore()
Gets score of the two strings currently being compared.
|
static void |
main(String[] args) |
static String[] |
parseInput(String str) |
public static final String SCORE
public static final String REASON
public static final String TERMINATION
public static final float NICKNAMES_THRES
public static final float RATIO_THRES
public static final String NICKNAMES_LIST
public static final String ACRONYMS_LIST
public static final String SHORTCUTS_LIST
public static final String HONORIFIC_LIST
public static final String COUNTRYLANG_LIST
public static final String PEOPLE_LIST
public static final String LOCATION_LIST
public EntityComparison() throws IOException
IOException
public HashMap<String,String> compareNames(String name1, String name2)
name1
- First of the two names being comparedname2
- Second of the two names being comparedpublic void compare(String name1, String name2)
name1
- First of the two names being comparedname2
- Second of the two names being comparedpublic HashMap<String,String> compare(HashMap<String,String> mapNames)
mapNames
- HashMap passed in by the wrapper to access the stringspublic float getScore()
public String getReason()
public static void main(String[] args)
Copyright © 2017. All rights reserved.