Dr. Jody Paul
jody@computer.org


Computer Science 3

Semantic Network - Spreading Activation

Invocation, Parameter and Return Value Formats

This document contains details regarding the required formats for the interface to the spreading activation product.

 

Terminology

The term semantic network is the domain-specific term that corresponds to the representational term undirected graph.

The term concept is the domain-specific term that corresponds to the representational term node.

The term link is the domain-specific term that corresponds to the representational term edge.

 

Representation of Semantic Network as Parameter

A semantic network parameter is represented as a list of links and single-element lists of isolated concepts.

For example, if E1, E2, E3 and E4 are links in the semantic network, then the representation of that network as a parameter is (E1 E2 E3 E4).

If SC is an isolated concept in the semantic network with links E7, E8 and E9, a representation of that network as a parameter is (E7 E8 E9 (SC)).

A concept is represented by a symbol.

Examples of concepts: dog dish food N1

A link is represented as a two-element list. The elements represent the two endpoint concepts of the link.

For example, if the semantic network contains a link between concept N1 and N2, representations of that link in a semantic network parameter are (N1 N2) or (N2 N1).

The following is an example of a correctly formed representation of a semantic network parameter consisting of concepts N1, N2, N3 and frog, with links between N1 and N2, N1 and N3, N2 and frog.

((N1 N2) (N1 N3) (N2 frog))

Recall that a concept that is not an endpoint of any link (an isolated concept) is represented as a one-element list in the list of links.

Thus, if we add a concept, N9, to the preceding semantic network such that N9 is not linked to any other concept, the following is a proper representation of that network.

((N1 N3) (N2 frog) (N9) (N2 N1))

 

Invocation and Return Value Specification for Spreading Activation product

The product must accept the following invocation from the terminal input stream.

(spread SN INIT THRESH)

Where:

spread is the required name of the invoking procedure.

SN is a semantic network whose representation was described previously.

INIT is a list of concepts that are initially activated.

THRESH is an integer that represents the threshold for stopping the spreading activation and reporting all nodes that have reached or exceeded that threshold.

For example,

(spread '((N1 sun) (N2 frog) (N2 N1) (sun frog) (N9)) '(N1 N9) 2)

is a valid execution request with the following interpretation:

  • the semantic network is ((N1 sun) (N2 frog) (N2 N1) (sun frog) (N9))
  • the initially active concepts are (N1 N9)
  • the activation threshold value is 2

The product must produce (as the return value) a list of concepts that have reached or exceeded the activation threshold in the previous activation spread step.

For example, given the previous activation request

(spread '((N1 sun) (N2 frog) (N2 N1) (sun frog) (N9)) '(N1 N9) 2)

the result should be

(frog)

If activation spread ceases before any concept has reached or exceeded the activation threshold, the procedure must halt and return the empty list.

For example,

(define network (list '(a b) '(a c) '(b c) '(c d)))
(define initial (list 'c))
(define thresh 4)
(spread network initial thresh)

should return

()

 

OPTIONAL

You may also provide another spreading activation procedure, spread-detail, that accepts the same arguments as spread but produces a different return value.

The return value of spread-detail is a list of concept-activation pairs that represent the activation values of each concept at the time the procedure halted.

For example,

(spread-detail '((N1 sun) (N2 frog) (N2 N1) (sun frog) (N9)) '(N1 N9) 2)

should return a list that has the same elements as

((N1 1) (sun 1) (N2 1) (frog 2) (N9 1))

Likewise,

(spread network initial thresh)

should return a list equivalent to

((a 2) (b 2) (c 3) (d 2))