|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectinfo.ephyra.answerselection.filters.Filter
info.ephyra.answerselection.filters.TruncationFilter
public class TruncationFilter
A filter that truncates the answer strings. It drops the following prefixes and suffixes:
This filter is not applied to answer strings that have been extracted with a rule- or list-based NE tagger since these answers are assumed to be properly formatted.
This class extends the class Filter.
| Field Summary | |
|---|---|
private static java.lang.String |
ARTICLES
Articles that are truncated from answer strings. |
private static java.lang.String |
SPECIAL_CHARS
Special characters that are truncated from answer strings. |
| Constructor Summary | |
|---|---|
TruncationFilter()
|
|
| Method Summary | |
|---|---|
Result |
apply(Result result)
Filters a single Result object. |
Result[] |
apply(Result[] results)
Filters an array of Result objects. |
static java.lang.String |
truncate(java.lang.String phrase)
Truncates a phrase. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private static final java.lang.String SPECIAL_CHARS
private static final java.lang.String ARTICLES
| Constructor Detail |
|---|
public TruncationFilter()
| Method Detail |
|---|
public static java.lang.String truncate(java.lang.String phrase)
phrase - phrase to truncate
public Result apply(Result result)
Result object.
apply in class Filterresult - result to filter
nullpublic Result[] apply(Result[] results)
Result objects.
apply in class Filterresults - results to filter
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||