Top Banner
Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer
35

Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Dec 19, 2015

Download

Documents

Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Data Models for Conceptual Structures

Roger T. Hartley

Heather D. Pfeiffer

Page 2: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Basic CS Graph

Page 3: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Definitional CP Graph

Page 4: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

CP Overlay Graph

Page 5: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Complete CP Procedural Graph

Page 6: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Small Example

• CS Graph example

• Simple CP overlay examples

• CP overlay across Definition Graphs

• CP Model

Page 7: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

PersonBirth is Graph

Person

Date

BirthDate

Person

CHRC

Birth

Date PTIM

Page 8: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Person is DefGraph

Person

CHRC

CHRC

Age

Birth

Date PTIM

Page 9: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

BirthDate is OvGraph

Person

Date

BirthDate

Page 10: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Now is DefGraph

DATE

Now

Page 11: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

ComputeNow is OvGraph

Date

Now

ComputeNow

Page 12: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Age is OvGraph

Birth

Date PTIM

Age

Date

DiffDt

Page 13: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

CurrentAge is PartModel

Person

CHRCCHRC

CurrentAge

Birth

Date PTIM

BirthDate

Birth

Date PTIM

DiffDt

Date

Now ComputeNow

Page 14: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

CGIF for Conceptual Structures• CG

CG ::= (Concept | Relation | Actor | SpecialContext | Comment)*

• ConceptConcept ::= "[" Type(1)? {CorefLinks?, Referent?} Comment? "]“

• RelationRelation ::= "(" Type(N) Arc* Comment? ")"

• ActorActor ::= "<" Type(N) Arc* "|" Arc* Comment? ">"

• SpecialContextSpecialContext ::= Negation | "[" SpecialConLabel ":"CG "]"

• CommentComment ::= DelimitedStr(";")

Page 15: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Data Model

ADTs Definition of types and structures Operations on those types

Page 16: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

DTD Structure

<!ELEMENT cg (concept | relation | actor | specialcontext | cgcomment)*>

<!ELEMENT concept (contypelabel?, (coreflinks | referent | ((coreflinks, referent) | (referent, coreflinks)))?,concomment?)>

<!ELEMENT relation (reltypelabel, arc*, relcomment?)>

<!ELEMENT actor (reltypelabel, arc*,(actorcomment)?)>

<!ELEMENT specialcontext (negation | (specialconlabel, cg))>

<!ELEMENT cgcomment (#PCDATA)>

Page 17: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Creation of Data Models

• Haskell Language

• By Hand – using XmlSpy

Page 18: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Haskell Data Model(Basic CS Constructs)

type CG = ([CNode], [RNode])type Label = Stringdata CNode = Concept Label Referentdata RNode = Relation Label InArcs OutArctype InArcs = [CNode]type OutArc = CNodedata Referent = Nil | Literal Literal | Graph CGdata Literal = LitString String | Name String | Marker String

Page 19: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Haskell Simple Example

let sit = Concept “Sit” Nil in

([],[Relation “AGT” [sit] Concept “Cat” Literal Name “Fred”,

Relation “LOC” [sit] Concept “Mat” Nil])

Page 20: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Haskell Data Model(Add Co-references)

type CG = ([CNode], [RNode])type Label = Stringtype CoRef = String data CNode = Concept Label Referent | DefConcept Label CoRef Referent | BoundConcept CoRefdata RNode = Relation Label InArcs OutArctype InArcs = [CNode]type OutArc = CNodedata Referent = Nil | Literal Literal | Graph CGdata Literal = LitString String | Name String | Marker String

Page 21: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Haskell Example(With Co-references)

([],[Relation “AGT”

[DefConcept “Sit” “x” Nil]

Concept “Cat” Literal Name “Fred”,

Relation “LOC”

[BoundConcept “x”]

Concept “Mat” Nil])

Page 22: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Haskell Grammar(Part 1)

CG : Node

| Node CG

Node : Relation

| Concept

| Actor

| Negation

Page 23: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Haskell Grammar(Part 2)

Relation: '(' TypeExp Arcs ')'

Actor : '<' id Arcs '|' Arcs '>'

Negation: '~' '[' CG ']'

Concept : '[' TypeExp ':' Referent ']'

| '[' TypeExp '*' id ':' Referent ']'

| '[' TypeExp ']'

| '[' TypeExp '*' id ']'

| '[' ']'

| '[' ':' Referent ']'

Page 24: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Graph Data Model Types

• Pointer Type

• Adjacency List Type

• Adjacency Matrix Type

Page 25: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Haskell XML Schema

Page 26: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

HaskellConcept

XML Schema

Page 27: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Haskell Concept Attribute

• Name - CoRef

• Type - xs:string

• Use - optional

Page 28: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Haskell Relation

XML Schema

Page 29: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Haskell Actor XML

Schema

Page 30: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Graph Tuple XML Schema

Page 31: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Graph Tuple

Concept XML

Schema

Page 32: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Graph Tuple Concept Attribute

• Name - uniquecon

• Type - xs:ID

• Use - required

Page 33: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Graph RCC Tuple XML Schema

Page 34: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Graph ACC Tuple XML Schema

Page 35: Data Models for Conceptual Structures Roger T. Hartley Heather D. Pfeiffer.

Graph Pair Lists XML

Schema