public class ChineseQuantifiableEntityNormalizer
extends java.lang.Object
QuantifiableEntityNormalizer
that normalizes NUMBER, DATE, TIME,
MONEY, PERCENT and ORDINAL amounts expressed in Chinese.
Note that this class is originally designed for the Chinese KBP Challenge, so it only
supports minimal functionalities. This needs to be completed in the future.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
BACKGROUND_SYMBOL |
Modifier and Type | Method and Description |
---|---|
static <E extends CoreMap> |
addNormalizedQuantitiesToEntities(java.util.List<E> list,
CoreMap document,
CoreMap sentence)
Identifies contiguous MONEY, TIME, DATE, or PERCENT entities
and tags each of their constituents with a "normalizedQuantity"
label which contains the appropriate normalized string corresponding to
the full quantity.
|
static java.lang.String |
normalizeDateString(java.lang.String s,
java.lang.String ctxdate)
Normalizes date strings.
|
public static <E extends CoreMap> void addNormalizedQuantitiesToEntities(java.util.List<E> list, CoreMap document, CoreMap sentence)
E
- list
- A list of CoreMap
s representing a single document.
Note: We assume the NERs has been labelled and the labels
will be updated in place.document
- sentence
- public static java.lang.String normalizeDateString(java.lang.String s, java.lang.String ctxdate)
s
- Input date stringctxdate
- Context date (usually doc_date)