Tuesday, February 03, 2004

Reader prototype core code

Reader
TextToParse.Parse(string SourceText);
sourceText = SourceText

Do while (!EndOfText)
{
SentenceToParse = TextToParse.GetNextSentence();
CurrentWordList = SentenceToParse.SearchWords();
CurrentPhraseList = SentenceToParse.SearchPhrases(CurrentWordList);
CurrentTextUnitList = MergeWordAndPhraseList(CurrentWordList, CurrentPhraseList)
TextPairList = SearchPairs(CurrentTextUnitList);
TextPairList.SaveToDB();

ReasonConsequenceRelationsList = SearchReasonConsequenceRelations(CurrentTextUnitList);
ShortMemory.Add(CurrentTextUnitList); // Partially clean old items out of ShortMemory; Add new items from CurrentTextUnitList to the ShortMemory
ShortMemory.ImproveReasonConsequenceRelations();
ShortMemory.SaveToTheMainMemory();
}

Comments: Post a Comment

<< Home

This page is powered by Blogger. Isn't yours?