I am developing an application that provides contextual knowledge lookup. The application is in its design phase.
I need to know whether a simple graph structure and a traversal algorithm would be sufficient or whether I should go with a neural network. I want to go with the most long-term solution.
I am thinking of representing individual concepts with simple nodes. Suppose I want to lookup John's hair color (which is black). I think I need four concept nodes: John, hair, color, and black. Here are two algorithms--which one is best suited for my task?
Traversal lookup algorithm
See this diagram for reference: http://chadjohnson.ath.cx:8080/static/concept%5Fmap.png
- Input (something like this), in order: 1. person 2. john 3. hair 4. color
- Find the graph node corresponding to 'person'.
- Look at all nodes adjacent to the 'person' node, and find the 'john' node.
- Look at all nodes adjacent to the 'john' node, and find a node that has links to both the 'hair' node and the 'color' node.
Another option would be to represent 'hair color' as its own concept node, making it so 'blond hair' is a 'hair color' concept. Then step (4) would become
Look at all nodes adjacent to the 'john' node, and find a node that is a 'hair color' concept.
Neural network algorithm
- Input, in no particular order: 1. person 2. john 3. hair 4. color
- Train the network to map these particular inputs to the concept 'blond hair'.
Any feedback would be appreciated. Thanks!