Solid State Technology
Volume: 63 Issue: 6
Publication Year: 2020
19668
Archives Available @ www.solidstatetechnology.us
keyword for that keyword topic. So, this weight should be set there. If it is already set, both weights are
updated to their average.
The Information interface introduces these methods: constructor(topic) returns Information object,
appendContent(content) returns the new content, setWeight(keyword, weight) returns the new weight, and
getValue() returns the value of the topic. The idea is at the time of the creation of the Information object, it is
important to set the topic. The method should make sure that there is no other Information objects with the
same topic and returns the object after creating it. The Information object starts with an initialized but empty
content which will be gradually appended as in Figure 3. The weights and value are updated after every
append. If another Information object is trying to set the weight (as we mentioned that setting weights is a
two-way process), it will use the setWeight method which will return the new weight or an updated one if it is
already set and update the value of the object. The getValue method will return the already calculated value.
Start
constructor
Set
topic
Append
(content)
Figure
Keywords
Set
Weights
Calculate
Value
Update
Storage
End
Figure 3 Information constructor flowchart
As an abstract object, the Information object might be inherited, implemented or extended by objects like
company profile, product catalog, search result, etc. according to the software implementation.
After defining the Information object, we can set the methods of the data-driven aspect. The storage object
saves the information objects and provides them under request. The interface of this object containsthree
basic methods: keep(Information) which will return the new added Information object or null if the topic
already exists, replace(Information) will replace an Information object with the same topic with the provided
object and returns it or null if an object with the same topic does not exist, and provide(topic) which will
return an Information object for the topic or null if the topic is not found. As the model grows, it will need
many different types of storage. Hence, an Indexer should be used which inherits the Storage object and
implements its method in addition to a list of topics and its corresponding storage. The object will introduce
the multiple storages in a single interface to the model and forward the methods to the corresponding storage
object according to the Information topic. For more global oriented design, the investors might provide online
Indexer objects as a service (DNS-like service).
The Retriever object retrieves the content from different resources. It has a single method:
retrieve(Information) that will return an updated version of the plugged Information object where the content
is appended and the value is recalculated. A file reader is an example of a Retriever that appends the content
to an Information object. A metasearch engine is another example of Retriever where the topic and the
keywords are the subjects of the search and the results are appended to the content. The Storage object
extends the Retriever object.
The Analyzer object processes a case and evaluates a general value accordingly as revealed in Figure 4. It
has four attributes: case, tree, significance threshold,and value. The case attribute is a statement that contains
at least one topic. The topics in the statement represent the starting point to construct the analyzing tree. The
tree contains a node for every topic, each topic is connected to an edge for each of its keywords. This process
iterate until the product weight of the leaf is insignificant.
Start
Constructor
Set
Case
Establish
Tree
Define
Weights
Calculate
Significance
Values
Calculate
Case Value
End
Figure 4 Analyzer constructor flowchart
The constructor sets the case attribute and starts constructing the tree by providing setting the head node as
the case itself. Then, it will add the Information objects of the topics to the tree as nodes connected to the
head. For each topic, if it has already set a weight to the other participating topics, these weights are added as
edges. Otherwise, the Analyzer will try to find common keywords shared on both topics. If found, a new
Do'stlaringiz bilan baham: |