Tuesday, February 10, 2004

Reader implementation --- Parse statement

1) Separate statement into words. Separator: any (non-letter and non-digit): " ", ".", "'", "/".
2) Save each word into WordDictionary if the word doesn't exist there still.
Any special character is considered as separate word.
Space (" ") is considered as nothing (no word).
3) At this point we have list of words. Each word is represented by NeuronId.
4) Try to find phrases in the word list
Let MaxQuantityOfWordsInPhrase = 5
The Statement Parser should try to separate find out phrases.
Let we have Statement ABCDEFG, where "A", "B", "C", "D", "E", "F", "G" are words.
Then the Parser should create phrases:
A
AB
ABC
ABCD
ABCDE
B
BC
BCD
DCDE
DCDEF
C
CD
CDE
CDEF
CDEFG
D
DE
DEF
DEFG
E
EF
EFG
F
FG
G

If initial Strength of "A" is NewSingleWordPhraseStrength then
Strength of "AB", "EF", and "FG" will be 2 * NewSingleWordPhraseStrength
Strength of "ABC", "EFG", and "CDE" will be 3 * NewSingleWordPhraseStrength
That is proportional to the quantity of words in the phrase.

********) At the end of Paragraph:
Try to find out "EndOfParagraph".
EndOfParagraph: <CR> (^P), <BR>(?).
End of paragraph should cause additional ShortMemoryForgettingProcess.

No comments: