public static final class NAFFilter.Builder extends Object
NAFFilters.
Supported properties accepted by withProperties(Map, String) and corresponding
setter methods:
| Property | Values | Corresponding method | Default |
|---|---|---|---|
| termSenseFiltering | true, false | withTermSenseFiltering(Boolean) |
true |
| termSenseCompletion | true, false | withTermSenseCompletion(Boolean) |
true |
| entityRemoveOverlaps | true, false | withEntityRemoveOverlaps(Boolean) |
true |
| entitySpanFixing | true, false | withEntitySpanFixing(Boolean) |
true |
| entityAddition | true, false | withEntityAddition(Boolean) |
true |
| entityValueNormalization | true, false | withEntityValueNormalization(Boolean) |
true |
| linkingCompletion | true, false | withLinkingCompletion(Boolean) |
true |
| linkingFixing | true, false | withLinkingFixing(Boolean) |
false |
| corefForRoleDependencies | true, false | withCorefForRoleDependencies(Boolean) |
false |
| corefSpanFixing | true, false | withCorefSpanFixing(Boolean) |
false |
| srlRemoveWrongRefs | true, false | withSRLRemoveWrongRefs(Boolean) |
true |
| srlRemoveUnknownPredicates | true, false | withSRLRemoveUnknownPredicates(Boolean) |
false |
| srlPredicateAddition | true, false | withSRLPredicateAddition(Boolean) |
true |
| srlSelfArgFixing | true, false | withSRLSelfArgFixing(Boolean) |
true |
| srlSenseMapping | true, false | withSRLSenseMapping(Boolean) |
false |
| srlFrameBaseMapping | true, false | withSRLFrameBaseMapping(Boolean) |
true |
| srlRoleLinking | none, exact, coref | withSRLRoleLinking(Boolean, Boolean) |
coref (= true, true) |
| opinionLinking | none, exact, coref | withOpinionLinking(Boolean, Boolean) |
coref (= true, true) |
| Modifier and Type | Method and Description |
|---|---|
NAFFilter |
build()
Creates a
NAFFilter based on the flags specified on this builder object. |
NAFFilter.Builder |
withCorefForRoleDependencies(Boolean corefForRoleDependencies)
Specifies whether new coreference relations should be added for APPO/NMOD/TITLE edges
in the dependency tree between proper nouns and role nouns.
|
NAFFilter.Builder |
withCorefSpanFixing(Boolean corefSpanFixing)
Specifies whether spans of existing coreference sets should be checked and possibly
shrinked or removed.
|
NAFFilter.Builder |
withEntityAddition(Boolean entityAddition)
Specifies whether new entities should be added to the document for noun phrases not
already marked as entities.
|
NAFFilter.Builder |
withEntityRemoveOverlaps(Boolean entityRemoveOverlaps)
Specifies whether entities overlapping with timex or (larger) entities should be
removed.
|
NAFFilter.Builder |
withEntitySpanFixing(Boolean entitySpanFixing)
Specifies whether the spans of entities should be checked and possibly fixed, removing
determiners and non-alphanumeric terms.
|
NAFFilter.Builder |
withEntityValueNormalization(Boolean entityValueNormalization)
Specifies whether normalization of numerical entity values (ordinal, cardinal, percent,
money) should take place.
|
NAFFilter.Builder |
withLinkingCompletion(Boolean linkingCompletion)
Specifies whether entity links in the LinkedEntities layer should be applied to
entities and predicates where missing, thus performing a kind of linking completion.
|
NAFFilter.Builder |
withLinkingFixing(Boolean linkingFixing)
Specifies whether removal of inaccurate entity links to DBpedia should occur.
|
NAFFilter.Builder |
withOpinionLinking(Boolean opinionLinking,
Boolean opinionLinkingUsingCoref)
Specifies whether ExternalRef tags should be added to opinion expressions, holder and
targets to lthe entities, timex and predicates their heads correspond to.
|
NAFFilter.Builder |
withProperties(Map<?,?> properties,
String prefix)
Sets all the properties in the map supplied, matching an optional prefix.
|
NAFFilter.Builder |
withSRLFrameBaseMapping(Boolean srlFrameBaseMapping)
Specifies whether mapping of rolesets / roles in the SRL layer to FrameBase classes /
properties should take place.
|
NAFFilter.Builder |
withSRLPredicateAddition(Boolean srlPredicateAddition)
Specifies whether new predicates can be added for verbs, noun and adjectives having
exactly one sense in PropBank or NomBank but not marked in the text.
|
NAFFilter.Builder |
withSRLPreMOnIRIs(Boolean srlPreMOnIRIs)
Specifies replace reference of predicate models in NAF with premon IRIs
|
NAFFilter.Builder |
withSRLPreprocess(Boolean srlPreprocess,
Boolean srlEnableMate,
Boolean srlEnableSemafor)
Specifies whether to preprocess SRL layer, enabling Mate and/or Semafor outputs.
|
NAFFilter.Builder |
withSRLRemoveUnknownPredicates(Boolean srlRemoveUnknownPredicates)
Specifies whether SRL predicates with unknown PropBank/NomBank rolesets/roles in the
NAF should be removed.
|
NAFFilter.Builder |
withSRLRemoveWrongRefs(Boolean srlRemoveWrongRefs)
Specifies whether ExternalRefs with wrong PropBank/NomBank rolesets/roles in the NAF
should be removed.
|
NAFFilter.Builder |
withSRLRoleLinking(Boolean srlRoleLinking,
Boolean useCoref)
Specifies whether ExternalRef tags should be added to SRL roles to link them to the
entities, timex and predicates in the NAF the role corresponds to.
|
NAFFilter.Builder |
withSRLSelfArgFixing(Boolean srlSelfArgFixing)
Specifies whether 'self-roles' can be added for predicates where missing or removed
where wrongly added.
|
NAFFilter.Builder |
withSRLSenseMapping(Boolean srlSenseMapping)
Specifies whether mapping of roleset / roles in the SRL layer should take place.
|
NAFFilter.Builder |
withTermSenseCompletion(Boolean termSenseCompletion)
Specifies whether missing term senses (BBN, SST, WN Synset, SUMO mapping ) should be
completed by applying sense mappings.
|
NAFFilter.Builder |
withTermSenseFiltering(Boolean termSenseFiltering)
Specifies whether term senses (BBN, SST, WN Synset, SUMO mapping, YAGO) for proper
names should be removed.
|
public NAFFilter.Builder withProperties(Map<?,?> properties, @Nullable String prefix)
properties - the properties to configure, not nullprefix - an optional prefix used to select the relevant properties in the mappublic NAFFilter.Builder withTermSenseFiltering(@Nullable Boolean termSenseFiltering)
termSenseFiltering - true to enable term sense filtering, null to use default valuepublic NAFFilter.Builder withTermSenseCompletion(@Nullable Boolean termSenseCompletion)
termSenseCompletion - true to enable term sense completion, null to use default valuepublic NAFFilter.Builder withEntityRemoveOverlaps(@Nullable Boolean entityRemoveOverlaps)
entityRemoveOverlaps - true, to enable removal of entities that overlap with other entities or
timex; null to use the default settingpublic NAFFilter.Builder withEntitySpanFixing(@Nullable Boolean entitySpanFixing)
entitySpanFixing - true, to enable fixing of entity spans (and possible removal of invalid
entities); null to use the default settingpublic NAFFilter.Builder withEntityAddition(@Nullable Boolean entityAddition)
entityAddition - true, to enable entity addition; null, to use the default settingpublic NAFFilter.Builder withEntityValueNormalization(@Nullable Boolean entityValueNormalization)
entityValueNormalization - true, to enable entity value normalization; null, to use the default settingpublic NAFFilter.Builder withLinkingCompletion(@Nullable Boolean linkingCompletion)
linkingCompletion - true, to perform linking completionpublic NAFFilter.Builder withLinkingFixing(@Nullable Boolean linkingFixing)
linkingFixing - true to enable linking fixing; null, to use the default settingpublic NAFFilter.Builder withCorefForRoleDependencies(@Nullable Boolean corefForRoleDependencies)
corefForRoleDependencies - true to enable addition of coreference relations for APPO/NMOD/TITLE edges;
null, to use the default settingpublic NAFFilter.Builder withCorefSpanFixing(@Nullable Boolean corefSpanFixing)
corefSpanFixing - true to enable coreference span fixing; null to use default settingpublic NAFFilter.Builder withSRLPreprocess(@Nullable Boolean srlPreprocess, @Nullable Boolean srlEnableMate, @Nullable Boolean srlEnableSemafor)
srlPreprocess - true, to enable preprocessing of SRL layersrlEnableMate - true, to enable Mate outputsrlEnableSemafor - true, to enable Semafor outputpublic NAFFilter.Builder withSRLRemoveWrongRefs(@Nullable Boolean srlRemoveWrongRefs)
srlRemoveWrongRefs - true, if removal of ExternalRefs with wrong PB/NB rolesets/roles has to be
enabledpublic NAFFilter.Builder withSRLRemoveUnknownPredicates(@Nullable Boolean srlRemoveUnknownPredicates)
srlRemoveUnknownPredicates - true, if removal of predicates with unknown PB/NB rolesets/roles has to be
enabledpublic NAFFilter.Builder withSRLPredicateAddition(@Nullable Boolean srlPredicateAddition)
srlPredicateAddition - true, to enable predicate addition; null to use the default settingpublic NAFFilter.Builder withSRLSelfArgFixing(@Nullable Boolean srlSelfArgFixing)
srlSelfArgFixing - true if role addition is enabledpublic NAFFilter.Builder withSRLSenseMapping(@Nullable Boolean srlSenseMapping)
srlSenseMapping - true, to enable SRL sense mapping; null, to use the default settingpublic NAFFilter.Builder withSRLFrameBaseMapping(@Nullable Boolean srlFrameBaseMapping)
srlFrameBaseMapping - true, to enable SRL to FrameBase mapping; null, to use the default settingpublic NAFFilter.Builder withSRLRoleLinking(@Nullable Boolean srlRoleLinking, @Nullable Boolean useCoref)
useCoref is specified, SRL roles are also linked to entities, timex
and predicates reachable via coreference chains.srlRoleLinking - true, to enable this filtering; null, to use the default settinguseCoref - true, to enable linking to coreferring entities/timex/predicates; null, to
use the default settingpublic NAFFilter.Builder withSRLPreMOnIRIs(@Nullable Boolean srlPreMOnIRIs)
srlPreMOnIRIs - true to enable IRI replacement, null to use default valuepublic NAFFilter.Builder withOpinionLinking(@Nullable Boolean opinionLinking, @Nullable Boolean opinionLinkingUsingCoref)
opinionLinking - true, to enable this linking; null, to use the default settingopinionLinkingUsingCoref - true, to enable linking to coreferring entities/timex/predicates; null, to
use the default settingpublic NAFFilter build()
NAFFilter based on the flags specified on this builder object.NAFFilterCopyright © 2016–2020 FBK. All rights reserved.