public class NounCombinationChain extends Object
| Modifier and Type | Field and Description |
|---|---|
private ArrayList<ANounCombiner> |
chain |
| Constructor and Description |
|---|
NounCombinationChain(NounCombiners firstCombiner,
NounCombiners... followingCombiners)
Creates a chain with all given Combiners.
|
| Modifier and Type | Method and Description |
|---|---|
private ANounCombiner |
resolveEnum(NounCombiners combinatorEnum)
Maps from Enum to specific instance of class.
|
void |
runChain(HAWKQuestion q)
Runs noun combination chain on given HAWKQuestion.
|
HAWKQuestion |
runChainReturnNew(HAWKQuestion q)
Finds compound nouns and creates a new HAWKQuestion with processed tree,
without affecting given HAWKQuestion in any way.
|
private ArrayList<ANounCombiner> chain
public NounCombinationChain(NounCombiners firstCombiner, NounCombiners... followingCombiners)
combiners - The combiners you want to use, in given order.private ANounCombiner resolveEnum(NounCombiners combinatorEnum)
combinatorEnum - The Enum which dependent class you want to
instantiate.public void runChain(HAWKQuestion q)
HAWKQuestion.getLanguageToNounPhrases() and
will alter MutableTree of question.
If you want to have a new processed Instance of HAWKQuestion, not
altering the given one, check runChainReturnNew(HAWKQuestion)q - public HAWKQuestion runChainReturnNew(HAWKQuestion q)
Note: This expects expects HAWKquestion already to be dependency parsed, e.g. a MutableTree with annotated Nodes is set.
q - HAWKQuestion to gather info from.Copyright © 2016–2017 Pivotal Software, Inc.. All rights reserved.