Package com.articulate.sigma.nlg
Class SumoProcessCollector
java.lang.Object
com.articulate.sigma.nlg.SumoProcessCollector
This object represents a process or an event, holding information on its case roles as
well as the entities which play that role.
-
Constructor Summary
ConstructorsConstructorDescriptionSumoProcessCollector(KB kb, String role, String process, String entity) Construct a SumoProcessCollector. -
Method Summary
Modifier and TypeMethodDescriptionvoidAdd a new role/entity pair to this event.Getter and setter for polarity field.static StringgetProperFormOfEntity(String entity, KB kb) Retain capitalization of names and reified instances by lower-casing if the entity is an Entity.Get all the roles and their entities for this event.voidmerge(SumoProcessCollector newProcessCollector) Merge the roles of the given SumoProcessCollector into this object.voidsetEntityProperties(com.google.common.collect.Multimap<String, SumoProcessEntityProperty> properties) Translate this process and its case roles into natural language.voidsetPolarity(VerbProperties.Polarity polarity) Translate this process and its case roles into natural language.toString()Write out a string representing all the fields in this object.
-
Constructor Details
-
SumoProcessCollector
Construct a SumoProcessCollector.- Parameters:
kb-role-process-entity-
-
-
Method Details
-
getSumoProcess
- Returns:
-
getPolarity
Getter and setter for polarity field. -
setPolarity
-
addRole
Add a new role/entity pair to this event.- Parameters:
role-arg-
-
getRolesAndEntities
Get all the roles and their entities for this event.- Returns:
-
getProperFormOfEntity
Retain capitalization of names and reified instances by lower-casing if the entity is an Entity.- Parameters:
entity-- Returns:
-
toString
Write out a string representing all the fields in this object. -
toNaturalLanguage
Translate this process and its case roles into natural language.- Returns:
- a natural language translation, or empty string if one is not possible
-
setEntityProperties
public void setEntityProperties(com.google.common.collect.Multimap<String, SumoProcessEntityProperty> properties) Translate this process and its case roles into natural language.- Parameters:
properties-
-
merge
Merge the roles of the given SumoProcessCollector into this object. If new SumoProcessCollector's polarity is Negative, set this object's to the same.- Parameters:
newProcessCollector-
-