String conjunction = phrase.getFeatureAsString(Feature.CONJUNCTION);
coordinated.setFeature(Feature.CONJUNCTION, conjunction);
coordinated.setFeature(Feature.CONJUNCTION_TYPE, phrase
.getFeature(Feature.CONJUNCTION_TYPE));
InflectedWordElement conjunctionElement = null;
if (children != null && children.size() > 0) {
if (phrase.getFeatureAsBoolean(Feature.RAISE_SPECIFIER)
.booleanValue()) {
raiseSpecifier(children);
}
NLGElement child = phrase.getLastCoordinate();
child.setFeature(Feature.POSSESSIVE, phrase
.getFeature(Feature.POSSESSIVE));
child = children.get(0);
setChildFeatures(phrase, child);
coordinated.addCoordinate(parent.realise(child));
for (int index = 1; index < children.size(); index++) {
child = children.get(index);
setChildFeatures(phrase, child);
if (phrase.getFeatureAsBoolean(Feature.AGGREGATE_AUXILIARY)
.booleanValue()) {
child.setFeature(InternalFeature.REALISE_AUXILIARY,
false);
}
if (child.isA(PhraseCategory.CLAUSE)) {
child
.setFeature(
Feature.SUPRESSED_COMPLEMENTISER,
phrase
.getFeature(Feature.SUPRESSED_COMPLEMENTISER));
}
//skip conjunction if it's null or empty string
if (conjunction != null && conjunction.length() > 0) {
conjunctionElement = new InflectedWordElement(
conjunction, LexicalCategory.CONJUNCTION);
conjunctionElement.setFeature(
InternalFeature.DISCOURSE_FUNCTION,
DiscourseFunction.CONJUNCTION);
coordinated.addCoordinate(conjunctionElement);
}