| |
- abst(frame)
- adultutterances(frame)
- return utterances as strings (hacky code)
- associate(utterances, meanings, associations, method=0)
- compute scoring between words and frames
if the method argument > 0 unrelated frames
will have their associations decreased.
- correctassociations(associations, wordcount, meaningcounters)
- do some math to correct associatons
- derivemeanings(situation, frameindex)
- for a given situation, return a list of derived meanings.
- elementiterator(tag, frame)
- iterator over elements with a specific tag in a frame
- framehash(frame)
- generate a hash value of a frame, by converting it to a string
representation and hashing that. The conversion is used to do a
"deep" conversion, instead of just comparing object references.
- frames(frame)
- frametostr(frame, nesting=0, removename=False)
- make 'human readable' string of a frame, for both pretty-printing
and finding duplicates.
- id(frame)
- main()
- then read words from stdin and find matching frames
(if this file is not called directly, main() will be ignored).
- makehashes(meanings, frameindex)
- ### Section Auxilary Functions
- oneword(xmldoc)
- parse corpus and generate derived frames,
parameter: use: xmldoc = minidom.parse("corpus.xml").documentElement
return: a tuple (associations, frameindex)
- parseutterances(situation, associations, method='default')
- Create a list of single words of all the adult utterances combined,
after stripping unwanted characters. If seperate utterances are needed
change this. As this is the oneword stage, sentence boundaries are
currently meaningless.
- printframe(frame)
- printsituation(situation)
- print a situation's description, frames and utterances
- properties(frame)
- updatemeaningcounters(meanings, meaningcounters)
- increment count of the occurrences of the meaning-frames.
these will be used to correct scores later on.
|