story.scheherazade.analysis
Class SCHIntersection

java.lang.Object
  extended by story.scheherazade.analysis.SCHIntersection
All Implemented Interfaces:
java.lang.Comparable

public class SCHIntersection
extends java.lang.Object
implements java.lang.Comparable


Constructor Summary
SCHIntersection(Timeline timelineHandler, java.lang.Object object, int truthDegree, SemanticRole role, java.util.Vector<SCHIntersection> args, NarrativeID storyID, NounName associatedName)
          Constructor for making a "seed" intersection
SCHIntersection(Timeline timelineHandler, java.lang.Object object, java.util.Vector<SCHIntersection> args, SCHIntersection source1, SCHIntersection source2, java.lang.StringBuffer notes)
          Constructor for making an intersection derived from other intersections
 
Method Summary
 void absorbContributorsOfDuplicate(SCHIntersection intersection)
           
 void addContributor(java.lang.Object contributingObject, ContributorID contributor, NarrativeID storyID)
           
 void addModifier(SCHIntersection modifier)
           
 void appendNote(java.lang.String note)
           
 int compareTo(java.lang.Object other)
           
 boolean coversSameStory(SCHIntersection other)
           
 SCHIntersection getArgOfRole(SemanticRole role)
           
 java.util.Vector<SCHIntersection> getArgs()
           
 double getAverageRelativePosition()
           
 java.util.TreeSet<Contributor> getContributors()
           
 java.util.Iterator<NarrativeID> getCoveredStories()
           
 NarrativeID getFirstCoveredStory()
           
 GenericScheherID getFrameType()
           
 int getMaxFrameSize()
          Get the number of possible arguments this intersection might have, which is the largest number of arguments of any contributing predicate.
 java.util.Vector<SCHIntersection> getModifiers()
           
 java.lang.Object getObject()
           
 int getOrdinalState()
           
 double getPairwiseScore()
           
 SemanticRole getRole()
           
 double getScore()
           
 SCHIntersection getSource1()
           
 SCHIntersection getSource2()
           
 int getStoryPosition()
           
 int getTruthDegree()
           
 boolean involvesContributor(AssignedPredicate target1, NarrativeID story)
           
 boolean involvesSources(SCHIntersection child1, SCHIntersection child2)
           
 boolean isDuplicateOf(SCHIntersection other)
           
 boolean isNull()
           
 SCHIntersection makeCopy()
           
 java.lang.Object makeMeanObject()
           
 int numContributors()
           
 int numCoveredStories()
           
 void overrideNotes(java.lang.StringBuffer newNotes)
           
 void overrideParents(SCHIntersection newSource1, SCHIntersection newSource2)
           
 java.lang.StringBuffer render()
           
 java.lang.StringBuffer render(boolean includeAncillaries)
           
 java.lang.StringBuffer render(Verbalizer verbalizer, StoryInterpreter story, Style style, PlannerRepository planners)
           
 boolean representsName(NameAssociation name)
          Return whether this intersection represents a named entity in one of the represented stories.
 SCHIntersection reSeed()
          Make a copy of the SCHIntersection that does not have any connection to real narratives; used for mean objects (abstractions)
 void setAverageRelativePosition(double averageRelativePosition)
           
 void setOrdinalState(int ordinalState)
           
 void setParaphraseMapping(ScheherIDWithType key, ScheherIDWithType replacement)
          Used when predicates are normalized, causing the type to no longer be a supertype of the contributor, making hop calculation impossible.
 void setScore(double score)
           
 void setStoryPosition(int position)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SCHIntersection

public SCHIntersection(Timeline timelineHandler,
                       java.lang.Object object,
                       int truthDegree,
                       SemanticRole role,
                       java.util.Vector<SCHIntersection> args,
                       NarrativeID storyID,
                       NounName associatedName)
                throws Scheherexception
Constructor for making a "seed" intersection

Throws:
Scheherexception

SCHIntersection

public SCHIntersection(Timeline timelineHandler,
                       java.lang.Object object,
                       java.util.Vector<SCHIntersection> args,
                       SCHIntersection source1,
                       SCHIntersection source2,
                       java.lang.StringBuffer notes)
                throws Scheherexception
Constructor for making an intersection derived from other intersections

Throws:
Scheherexception
Method Detail

getTruthDegree

public int getTruthDegree()
                   throws Scheherexception
Throws:
Scheherexception

coversSameStory

public boolean coversSameStory(SCHIntersection other)
                        throws Scheherexception
Throws:
Scheherexception

getFirstCoveredStory

public NarrativeID getFirstCoveredStory()

getCoveredStories

public java.util.Iterator<NarrativeID> getCoveredStories()

numCoveredStories

public int numCoveredStories()

getRole

public SemanticRole getRole()
                     throws Scheherexception
Throws:
Scheherexception

absorbContributorsOfDuplicate

public void absorbContributorsOfDuplicate(SCHIntersection intersection)
                                   throws Scheherexception
Throws:
Scheherexception

isDuplicateOf

public boolean isDuplicateOf(SCHIntersection other)
                      throws Scheherexception
Throws:
Scheherexception

addContributor

public void addContributor(java.lang.Object contributingObject,
                           ContributorID contributor,
                           NarrativeID storyID)
                    throws Scheherexception
Throws:
Scheherexception

addModifier

public void addModifier(SCHIntersection modifier)
                 throws Scheherexception
Throws:
Scheherexception

numContributors

public int numContributors()

getContributors

public java.util.TreeSet<Contributor> getContributors()

getModifiers

public java.util.Vector<SCHIntersection> getModifiers()

getArgs

public java.util.Vector<SCHIntersection> getArgs()
                                          throws Scheherexception
Throws:
Scheherexception

involvesSources

public boolean involvesSources(SCHIntersection child1,
                               SCHIntersection child2)

involvesContributor

public boolean involvesContributor(AssignedPredicate target1,
                                   NarrativeID story)
                            throws Scheherexception
Throws:
Scheherexception

getOrdinalState

public int getOrdinalState()

setOrdinalState

public void setOrdinalState(int ordinalState)

getStoryPosition

public int getStoryPosition()

setStoryPosition

public void setStoryPosition(int position)

getPairwiseScore

public double getPairwiseScore()
                        throws Scheherexception
Throws:
Scheherexception

getMaxFrameSize

public int getMaxFrameSize()
                    throws Scheherexception
Get the number of possible arguments this intersection might have, which is the largest number of arguments of any contributing predicate.

Throws:
Scheherexception

getObject

public java.lang.Object getObject()

render

public java.lang.StringBuffer render(Verbalizer verbalizer,
                                     StoryInterpreter story,
                                     Style style,
                                     PlannerRepository planners)
                              throws Scheherexception
Throws:
Scheherexception

render

public java.lang.StringBuffer render()
                              throws Scheherexception
Throws:
Scheherexception

render

public java.lang.StringBuffer render(boolean includeAncillaries)
                              throws Scheherexception
Throws:
Scheherexception

getScore

public double getScore()

setScore

public void setScore(double score)

getAverageRelativePosition

public double getAverageRelativePosition()

setAverageRelativePosition

public void setAverageRelativePosition(double averageRelativePosition)

compareTo

public int compareTo(java.lang.Object other)
              throws java.lang.ClassCastException
Specified by:
compareTo in interface java.lang.Comparable
Throws:
java.lang.ClassCastException

makeMeanObject

public java.lang.Object makeMeanObject()
                                throws Scheherexception
Throws:
Scheherexception

getFrameType

public GenericScheherID getFrameType()
                              throws Scheherexception
Throws:
Scheherexception

reSeed

public SCHIntersection reSeed()
                       throws Scheherexception
Make a copy of the SCHIntersection that does not have any connection to real narratives; used for mean objects (abstractions)

Throws:
Scheherexception

makeCopy

public SCHIntersection makeCopy()
                         throws Scheherexception
Throws:
Scheherexception

setParaphraseMapping

public void setParaphraseMapping(ScheherIDWithType key,
                                 ScheherIDWithType replacement)
                          throws Scheherexception
Used when predicates are normalized, causing the type to no longer be a supertype of the contributor, making hop calculation impossible. Adds a bridge from one form to its normalized form

Throws:
Scheherexception

appendNote

public void appendNote(java.lang.String note)

isNull

public boolean isNull()

overrideParents

public void overrideParents(SCHIntersection newSource1,
                            SCHIntersection newSource2)

overrideNotes

public void overrideNotes(java.lang.StringBuffer newNotes)
                   throws Scheherexception
Throws:
Scheherexception

getArgOfRole

public SCHIntersection getArgOfRole(SemanticRole role)
                             throws Scheherexception
Throws:
Scheherexception

getSource1

public SCHIntersection getSource1()

getSource2

public SCHIntersection getSource2()

representsName

public boolean representsName(NameAssociation name)
                       throws Scheherexception
Return whether this intersection represents a named entity in one of the represented stories.

Throws:
Scheherexception


Copyright © 2011 David K. Elson. All Rights Reserved.