-
-
Notifications
You must be signed in to change notification settings - Fork 19
Description
The SemanticConceptList provides a way to format an "and/conjunction" list, an "or/disjunction" list, and a generic list. The generic list could be used for an adjective list. The ListTest.cpp contains a lot of examples of how it can be used.
Given an array of SemanticFeatureConceptBase, you should be able to apply various text transformations or inflection operations. For example, I could make each item in a list definite or indefinite. Some items may use the default behavior of InflectableStringConcept, but some custom inflections may want to use SemanticConcept.
I could query a list for the gender value and use it in a selector operation.
A SemanticConceptList is special because it can use context sensitive words. The "and" or "or" may vary depending on the adjacent words.
The following optional parameters need to be supported.
- type or list: This could be "and" or "conjuction", or "or" or "disjunction". If it's nothing, the default is used.
- beforeFirst: You might want to add a demonstrative pronoun or possessive pronoun here, like a
PronounConcept. - itemPrefix:
- itemSuffix: You might want to add a possessive pronoun, like a
PronounConcept. - afterFirst:
- itemDelimiter: Most people that this would be a ", ", but for adjective lists, it could be just a space in some languages.
- beforeLast:
- afterLast: When used in some East Asian languages, like Chinese, this may be used for adjective lists, where you may add . When the list is not empty, this will get formatted.
Ideally, the list should allow chained transformations on each item, like title casing, and quoting, or making each genitive, or making each use a possessive pronoun. The possessive pronouns are important for languages like Arabic, Malay, Indonesian, and Finnish.
Adding a demonstrative pronoun would require adding the equivalent of "this" or "that" to each item, and the choice of the demonstrative pronoun would be sensitive to the gender or grammatical number of team item. So a list like [cat, dogs] with "this" being applied to each item would have "this cat, and these dogs".