1.  Introduction

The purpose of this document is to provide the component design of the NLP program. This document will present the architecture design of the NLP program.

1.1  Background

The purpose of the project is to read in an English sentence as described in the Vision document and produce an internal structure and logic for that sentence. Please refer to the vision document for a more detailed description.

1.2  References

[1] Naga Sowjanya Karumuri, Component Design Document. Retrieved 11/21/2009, from Sowjanya’s Project Page Web Site: http://people.cis.ksu.edu/~sowji/100jiMSE/

[2] Tamayo, Damian, Vision Plan Document. From Project Web Site: http://cis.ksu.edu/~dtamayo

[3] Tamayo, Damian, Architecture Design Document. From Project Web Site: http://cis.ksu.edu/~dtamayo

[4] http://cis.ksu.edu/~dtamayo/Collapsed_Diagram.html

[5] http://cis.ksu.edu/~dtamayo/Expanded_Diagram.html

2.0 NLP Program Overview

The following diagram shows the system overview.

Figure 1 : Overview of the NLP program

2.1 Data Flow

Figure 2 : Steps with correlating sample data examples for input and output

Figure 1 references the NLP program as a whole. The architecture and component design for the system as a whole can be found in [3], [4], and [5]. As a result, I will present the PPOS subsystem in this document. Figure 2 shows the flow of information through the NLP program. The left side of the diagram depicts the steps that the user can take when using the program. The right side of the diagram depicts the type of data that can be transferred at each correlating point.

3.0 PPOS System

3.1 Client Code

Method / Visibility / Action
getPPOSParse(String) / Private / Gets a saved parse from the PPOS server when a sentence is entered into the main form
Process_Click() / Private / If the diagram is empty a new diagram is created and it adds nodes to an existing diagram.
createRoot() / Private / Creates the root of a new diagram
Navigate(shapebase) / Private / Takes in the root of a tree that is displayed and navigates through the tree to get the point at which to add a new node.
unselect(shapebase) / Private / Takes in the root of the diagram and deselect all nodes in the diagram so that the last added node is the node at which a new node is added.
getSentence(shapeBase, str) / Private / Takes in the root of the diagram and collects the leaves in order and concatenates them to str. Str contains the sentence that is stored in conjunction with the parse.
Store(shapeBase, str) / Private / Takes in the root of the diagram and cycles through the tree and creates a parse string which is returned as str.
newDiag_Click / Private / Clears the current diagram and creates a new one
Save_Click / Private / Stores the parse and the sentence of the
getList(String) / Public / Gets the list of parses and sentences saved to the server
Recreate(String) / Public / Saves a user modified list of saved parses and sentences back to the server
Remove_Click / Private / Removes a sentence and it’s parse from the list of saved parses and sentences
Sv_Click / Private / Saves the list of parses and sentences back to the server
Clear_click / Private / Clears the list of saved parses and sentences
Deslect_Click / Private / Deselects the nodes in the tree

The purpose of the server code is to create, save, and maintain sentences and their parses. The GUI that interacts with the server should have capabilities for all of these capabilities.

3.2 Server Code

Method / Visibility / Action
Load() / Private / The list of parses and sentences are stored as a serialized object. Upon the call to the method load, the system will read in this serialized object into and arraylist which the program will then use to access the sentences and their parses
Save() / Private / This function will save the sentences and their parses to a serialized object for persistence
Recreate(String) / Private / This function will take in a string of sentences and parses that will replace the current list of sentences and parses in the system. The system will clear the current list and load in the new list. Then it will save and reload the list.
Retrieve(String) / Private / This function returns the entire list of sentences and parses to the client.
Reload() / Private / This function saves and then reloads the list of sentences and parses in the system.
Find(String) / Private / This function will take in a sentence and return the parse of that sentence. Every sentence and its parse are stored in pairs.
Contains(String) / Private / This function checks to see if the sentence is in the system before trying to return the parse.

3.3 Data Flow

Figure 3

Figure 3 displays the flow of information through the PPOS system. The left side of the diagram depicts decisions by the user and the right hand side shows sample data that may be transferred at those correlating steps.