|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--SourceText.SourceText
Builds a semantic network from an English description.
See the dissertation document for more details.
SCENE := 'The scene contains' CONCEPTS '.' DESCRIPTOR* CONCEPTS := ['a'|'an'] CONCEPT ['named' INSTANCE] [',' ['and'] CONCEPTS] DESCRIPTOR := IDENTIFIER 'is' DESCRIPTION '.' DESCRIPTION := ((ADJECTIVE | (PREPOSITION IDENTIFIER)) [',' ['and'] DESCRIPTION] IDENTIFIER := 'the ' CONCEPT) | INSTANCE INSTANCE := single-word alphanumeric string CONCEPT := concept name ADJECTIVE := attribute name PREPOSITION := relation name
| Field Summary | |
private java.util.LinkedList |
m_attribute_names
|
private java.util.LinkedList |
m_concept_names
|
private KnowledgeBase |
m_knowledge_base
|
private java.util.LinkedList |
m_relation_names
|
private SemanticNetwork |
m_semantic_network
|
private java.lang.String |
m_source_text_postprocessed
|
private java.lang.String |
m_source_text_preprocessed
|
| Constructor Summary | |
SourceText(java.lang.String source_text,
KnowledgeBase knowledge_base,
java.lang.String semantic_network_name,
java.lang.String semantic_network_description)
Creates a SourceText object with the given description. |
|
| Method Summary | |
private void |
buildCrossreferenceList(java.util.Collection source_list,
java.util.LinkedList target_list)
Sorts the contents of the source list descending by length and adds them to the target list. |
private void |
buildSemanticNetwork()
Builds the semantic network. |
SemanticNetwork |
getSemanticNetwork()
Returns the semantic network built from the source text. |
java.lang.String |
getSourceTextPostprocessed()
Returns the postprocessed source text. |
java.lang.String |
getSourceTextPreprocessed()
Returns the preprocessed source text. |
private void |
preprocessText()
Formats the source text and combines registered multiword units (e.g., 'in front of') into single units for parsing (i.e., 'in-front-of'). |
java.lang.String |
toString()
Returns a string representation of this object. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
private java.lang.String m_source_text_preprocessed
private java.lang.String m_source_text_postprocessed
private KnowledgeBase m_knowledge_base
private SemanticNetwork m_semantic_network
private java.util.LinkedList m_concept_names
private java.util.LinkedList m_relation_names
private java.util.LinkedList m_attribute_names
| Constructor Detail |
public SourceText(java.lang.String source_text,
KnowledgeBase knowledge_base,
java.lang.String semantic_network_name,
java.lang.String semantic_network_description)
throws java.lang.Exception
source_text - - the source-text descriptionknowledge_base - - the knowledge basesemantic_network_name - - the name to assign to the semantic network to buildsemantic_network_description - - the optional description to assign to the semantic network
java.lang.Exception - - if parsing fails| Method Detail |
private void buildCrossreferenceList(java.util.Collection source_list,
java.util.LinkedList target_list)
source_list - - the source listtarget_list - - the target list
private void buildSemanticNetwork()
throws java.lang.Exception
java.lang.Exceptionpublic SemanticNetwork getSemanticNetwork()
public java.lang.String getSourceTextPostprocessed()
public java.lang.String getSourceTextPreprocessed()
private void preprocessText()
public java.lang.String toString()
toString in class java.lang.ObjectSupport.toPrettyString(java.lang.String)
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||