Class SumoProcessCollector

java.lang.Object
com.articulate.sigma.nlg.SumoProcessCollector

public class SumoProcessCollector extends Object
This object represents a process or an event, holding information on its case roles as well as the entities which play that role.
  • Constructor Details

    • SumoProcessCollector

      public SumoProcessCollector(KB kb, String role, String process, String entity)
      Construct a SumoProcessCollector.
      Parameters:
      kb -
      role -
      process -
      entity -
  • Method Details

    • getSumoProcess

      public SumoProcess getSumoProcess()
      Returns:
    • getPolarity

      public VerbProperties.Polarity getPolarity()
      Getter and setter for polarity field.
    • setPolarity

      public void setPolarity(VerbProperties.Polarity polarity)
    • addRole

      public void addRole(String role, String arg)
      Add a new role/entity pair to this event.
      Parameters:
      role -
      arg -
    • getRolesAndEntities

      public com.google.common.collect.Multimap<CaseRole,String> getRolesAndEntities()
      Get all the roles and their entities for this event.
      Returns:
    • getProperFormOfEntity

      public static String getProperFormOfEntity(String entity, KB kb)
      Retain capitalization of names and reified instances by lower-casing if the entity is an Entity.
      Parameters:
      entity -
      Returns:
    • toString

      public String toString()
      Write out a string representing all the fields in this object.
      Overrides:
      toString in class Object
      Returns:
    • toNaturalLanguage

      public String 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

      public void merge(SumoProcessCollector newProcessCollector)
      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 -