public abstract class InternalFeature extends Object
This class defines a list of features internally used within the SimpleNLG system. Note that there are three feature classes in SimpleNLG.
Feature: features typically set up developers invoking SimpleNLG
LexicalFeature: features typically set up the SimpleNLG lexicon
InternalFeature: features typically used internally by SimpleNLG
Elements in the system can, in theory, take any kind of feature. Some features will only be expected by certain processors, however. Developers can define their own features but should choose names that do not conflict with those presented here.
The details for each feature are supplied in a table. The entries are:
| Feature name | This is the name that will appear in the element's feature list as
produced by the toString() method or by calling
getAllFeatureNames |
| Expected type | As features are represented as a Map connecting a
String and an Object then, in theory, a feature can
take any object as a value. This table entry defines the type that the
SimpleNLG system expects. |
| Created by | Defines where the feature is created. In addition, all features can be added specifically by users |
| Used by | Defines which processors use the feature. |
| Applies to | Defines which structural, syntactical or lexical elements this feature is applied to. |
| Default | Any default values attributed to the feature are given here. |
| Modifier and Type | Field and Description |
|---|---|
static String |
ACRONYM
This feature determines if the element is an acronym.
|
static String |
BASE_WORD
This feature is used to reference the base word element as created by the
lexicon.
|
static String |
CLAUSE_STATUS
This feature determines the status of a sentence.
|
static String |
COMPLEMENTS
This feature refers to the list of complements for the phrase.
|
static String |
COMPONENTS
This feature refers to the list of components in a
ListElement. |
static String |
COORDINATES
This feature is the list of coordinated phrases in a
CoordinatedPhraseElement. |
static String |
DISCOURSE_FUNCTION
This feature defines the role each element plays in the structure of the
text.
|
static String |
FRONT_MODIFIERS
This feature tracks any front modifiers in sentences.
|
static String |
HEAD
This feature points to the head element in a phrase.
|
static String |
IGNORE_MODAL
This flag is used to determine if the modal should be included in the
verb phrase.
|
static String |
INTERROGATIVE
This flag determines if the sentence is interrogative or not.
|
static String |
NON_MORPH |
static String |
POSTMODIFIERS
This feature represents the list of post-modifier elements.
|
static String |
PREMODIFIERS
This feature represents the list of premodifier elements.
|
static String |
RAISED
This flag is used to define whether a noun phrase has had its specifier
raised.
|
static String |
REALISE_AUXILIARY
This flag determines if auxiliary verbs should be realised in coordinated
verb phrases.
|
static String |
SPECIFIER
This feature contains the specifier for a noun phrase.
|
static String |
SUBJECTS
This feature represents the list of subjects in a clause.
|
static String |
VERB_PHRASE
This feature represents the verb phrase in a clause.
|
public static final String ACRONYM
This feature determines if the element is an acronym.
| Feature name | isAcronym |
| Expected type | Boolean |
| Created by | The phrase factory creates the feature on noun phrases. The syntax processor creates the feature on nouns. |
| Used by | No processors currently use this feature. It is expected to be used by the orthography processor. |
| Applies to | Nouns and noun phrases. |
| Default | Boolean.FALSE |
public static final String BASE_WORD
This feature is used to reference the base word element as created by the lexicon.
| Feature name | baseWord |
| Expected type | WordElement |
| Created by | Currently initially set by the syntax processor but should be done by the phrase factory with the syntax and morphology processors only setting this if the it doesn't already exist. |
| Used by | The syntax processor refers to the base word when determining adjective ordering. The morphology processor also needs the base word for performing morphology on the lexical items. |
| Applies to | InflectedWordElements of any category. |
| Default | null |
public static final String CLAUSE_STATUS
This feature determines the status of a sentence.
| Feature name | clauseStatus |
| Expected type | ClauseStatus |
| Created by | The phrase factory creates this feature when creating sentences. |
| Used by | The syntax processor refers to the clause status when deciding whether to add the complementiser or not. Only subordinate clauses will have the complementiser added. |
| Applies to | Clauses. |
| Default | ClauseStatus.MATRIX |
public static final String COMPLEMENTS
This feature refers to the list of complements for the phrase.
| Feature name | complements |
| Expected type | List<NLGElement> |
| Created by | The phrase factory has the functionality for taking complements when creating prepositional phrases or sentences. Complements can also be added to other types of phrases by the user. |
| Used by | The syntax processor realises the complements in the correct syntactical order when realising phrases. |
| Applies to | Phrases of any type. |
| Default | ClauseStatus.MATRIX |
public static final String COMPONENTS
This feature refers to the list of components in a
ListElement.
| Feature name | components |
| Expected type | List<NLGElements> |
| Created by | The syntax processor creates ListElements with
components. This is done as part of the normal realisation of phrases
into a list of words. Components can be added by the user. |
| Used by | The syntax and morphology processors both access the components
feature when realising ListElements. |
| Applies to | ListElements. |
| Default | null |
public static final String COORDINATES
This feature is the list of coordinated phrases in a
CoordinatedPhraseElement.
| Feature name | coordinates |
| Expected type | List<NLGElements> |
| Created by | CoordinatedPhraseElement has convenience methods for
adding the coordinate phrases to a particular. |
| Used by | The syntax processors creates the structure of coordinated phrases and adds in the conjoining word where appropriate. |
| Applies to | CoordinatedPhraseElementss only. |
| Default | null |
public static final String DISCOURSE_FUNCTION
This feature defines the role each element plays in the structure of the text. For example, the phrase John played football has John as the subject, play as the base verb and football as the complement.
| Feature name | discourseFunction |
| Expected type | DiscourseFunction |
| Created by | The syntax processor defines the function of each word as it parses phrases. |
| Used by | The morphology processor uses the function when checking pronoun inflections. |
| Applies to | Any NLGElement but typically words. |
| Default | null |
public static final String NON_MORPH
public static final String FRONT_MODIFIERS
This feature tracks any front modifiers in sentences. Front modifiers are placed after the cue phrase but before the subject.
| Feature name | frontModifiers |
| Expected type | NLGElement |
| Created by | Front modifiers need to be manually added by users. |
| Used by | The syntax processor realises front modifiers in their correct place within the structure of the sentence. |
| Applies to | Sentences. |
| Default | null |
public static final String HEAD
This feature points to the head element in a phrase. The head element is
deemed to be the subject in a noun phrase, the verb in a verb phrase, the
adjective in an adjective phrase, the adverb in an adverb phrase or the
preposition in a preposition phrase. The PhraseElement has a
convenience method for getting and setting the head feature.
| Feature name | phraseHead |
| Expected type | NLGElement |
| Created by | The phrase factory sets an appropriate head when constructing phrases. |
| Used by | The syntax processor uses the head element when constructing the correct syntax for the text. The head element is also important for determining the main verb in a verb group. |
| Applies to | Phrases. |
| Default | The value is set to an appropriate element by the phrase factory. |
public static final String IGNORE_MODAL
This flag is used to determine if the modal should be included in the verb phrase.
| Feature name | ignoreModal |
| Expected type | Boolean |
| Created by | The syntax processor sets this flag when dealing with interrogatives. |
| Used by | The syntax processor will ignore modals on certain interrogatives. |
| Applies to | Coordinated phrases and verb phrases. |
| Default | Boolean.FALSE |
public static final String INTERROGATIVE
This flag determines if the sentence is interrogative or not.
| Feature name | isInterrogative |
| Expected type | Boolean |
| Created by | The syntax processor sets this feature on sentences if a contained phrase is interrogative. |
| Used by | Orthography processor uses this to add a question mark instead of a period at the end of interrogative sentences. |
| Applies to | Sentences only. |
| Default | Boolean.FALSE. |
public static final String POSTMODIFIERS
This feature represents the list of post-modifier elements. Post-modifiers are added to the end of phrases and coordinated phrases.
| Feature name | postModifiers |
| Expected type | List<NLGElement> |
| Created by | The user specifies the post-modifiers. Convenience methods are added. |
| Used by | The syntax processor correctly adds the post-modifiers into the structure of the text. |
| Applies to | Clauses, phrases and coordinated phrases. |
| Default | null. |
public static final String PREMODIFIERS
This feature represents the list of premodifier elements. Premodifiers are added to phrases before the head of the phrase, and to coordinated phrases before the coordinates.
| Feature name | preModifiers |
| Expected type | List<NLGElement> |
| Created by | The user specifies the premodifiers. Convenience methods are added. |
| Used by | The syntax processor correctly adds the premodifiers into the structure of the text. |
| Applies to | Clauses, phrases and coordinated phrases. |
| Default | null. |
public static final String RAISED
This flag is used to define whether a noun phrase has had its specifier
raised. It is used in conjunction with the RAISE_SECIFIER
feature.
| Feature name | isRaised |
| Expected type | Boolean |
| Created by | The syntax processor sets this flag on noun phrases when processing coordinated phrases whose specifier has been raised. |
| Used by | The syntax processor to correctly add or remove specifiers. |
| Applies to | Noun phrases only. |
| Default | Boolean.FALSE |
public static final String REALISE_AUXILIARY
This flag determines if auxiliary verbs should be realised in coordinated verb phrases.
| Feature name | isRealiseAuxiliary |
| Expected type | Boolean |
| Created by | The syntax processor sets this flag on verb phrases when processing
coordinated phrases which has had the AGGREGATE_AUXILIARY
feature set. |
| Used by | The syntax processor to correctly add or ignore auxiliary verbs in verb phrases. |
| Applies to | Verb phrases only. |
| Default | Boolean.FALSE |
public static final String SPECIFIER
This feature contains the specifier for a noun phrase. For example the and my.
| Feature name | specifier |
| Expected type | NLGElement or String |
| Created by | Specifiers are added to noun phrases when they are constructed by the phrase factory. |
| Used by | The syntax processor places specifiers before the main subject in a noun phrase. |
| Applies to | Noun phrases only. |
| Default | null |
public static final String SUBJECTS
This feature represents the list of subjects in a clause.
| Feature name | subjects |
| Expected type | List<NLGElement> |
| Created by | Subjects are added to clauses through the phrase factory. |
| Used by | The syntax processor realises all subjects in the correct place. |
| Applies to | Clauses only. |
| Default | null. |
public static final String VERB_PHRASE
This feature represents the verb phrase in a clause.
| Feature name | verbPhrase |
| Expected type | NLGElement, typically a PhraseElement, but
can also be a String |
| Created by | The verb phrase is added to clauses through the phrase factory. |
| Used by | The syntax processor realises the verb phrase in the correct place. |
| Applies to | Clauses only. |
| Default | null. |
Copyright © 2020. All Rights Reserved.