public class PascalTemplate extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
BACKGROUND_SYMBOL |
static String[] |
fields |
| Constructor and Description |
|---|
PascalTemplate() |
PascalTemplate(PascalTemplate pt) |
| Modifier and Type | Method and Description |
|---|---|
static boolean |
acronymMatch(String s1,
String s2,
HashMap stemmedAcronymIndex) |
boolean |
equals(Object obj) |
static int |
getFieldIndex(String tag) |
String |
getValue(String fieldName) |
int |
hashCode() |
static PascalTemplate |
mergeCliqueTemplates(DateTemplate dt,
String location,
InfoTemplate wi)
Merges partial (clique) templates into a full one.
|
void |
print() |
void |
setValue(int index,
String value) |
void |
setValue(String fieldName,
String value)
Sets template values.
|
static String |
stemAcronym(String s,
CliqueTemplates ct) |
String |
toString() |
void |
unpackToCliqueTemplates(CliqueTemplates ct,
double score)
Divides this template into partial templates, and updates the counts of these
partial templates in the
CliqueTemplates object. |
void |
writeToFieldValueCounter(Counter<String>[] fieldValueCounter,
double score)
Should be passed a
Counter[], each entry of which
keeps scores for possibilities in that template slot. |
public static final String[] fields
public static final String BACKGROUND_SYMBOL
public PascalTemplate()
public PascalTemplate(PascalTemplate pt)
public static String stemAcronym(String s, CliqueTemplates ct)
public static PascalTemplate mergeCliqueTemplates(DateTemplate dt, String location, InfoTemplate wi)
dt - date templatelocation - locationwi - workshop/conference info templatePascalTemplate resulting from this merge.public void setValue(String fieldName, String value)
fieldName - (i.e. workshopname, workshopdate)public void setValue(int index,
String value)
public static int getFieldIndex(String tag)
tag - field name (i.e. workshopdate, workshoplocation)Indexpublic void writeToFieldValueCounter(Counter<String>[] fieldValueCounter, double score)
Counter[], each entry of which
keeps scores for possibilities in that template slot. The counter
for each template value is incremented by the corresponding score of
this PascalTemplate.fieldValueCounter - an array of counters, each of which holds label possibilities for one fieldscore - increment counts by this much.public void unpackToCliqueTemplates(CliqueTemplates ct, double score)
CliqueTemplates object.ct - the partial templates counter objectscore - increment counts by this muchpublic void print()