abstract class ANounCombiner extends Object
| Constructor and Description |
|---|
ANounCombiner() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract void |
combineNouns(HAWKQuestion q)
This sets compound nouns as Entity in question.
|
protected static void |
processTree(HAWKQuestion q)
Compound nouns are spread over multiple Nodes in MutableTree.
|
protected static void |
setEntity(List<String> subsequence,
HAWKQuestion q,
int subsequenceStartOffset) |
protected abstract void combineNouns(HAWKQuestion q)
Note: This expects expects HAWKquestion already to be dependency parsed, e.g. a MutableTree with annotated Nodes is set. Use#combineNounsOnNew(HAWKQuestion)to get a new processed tree, without affecting HAWKQuestion UseprocessTree(HAWKQuestion)to prune all found CombinedNNs in MutbaleTree directly in HAWKQuestion
q - HAwkquestion to processprotected static void processTree(HAWKQuestion q)
HAWKQuestion.getLanguageToNounPhrases() is used to find Nodes to
combine. Be sure to set combinedNouns there using
combineNouns(HAWKQuestion) beforehand.q - HAWKQuestion to processprotected static void setEntity(List<String> subsequence, HAWKQuestion q, int subsequenceStartOffset)
Copyright © 2016–2017 Pivotal Software, Inc.. All rights reserved.