Homework/HW05/main.cc
void indexWords(HashTable &stopList, HashTable &indexing)
{
    char word[KEYWORDSIZE];
    WordCounter wordc;
    cout << "Enter words separated by spaces or new lines.\n"
         << "The program will output the Porter transform of the words.\n"
         << "End the input with Ctrl-D." << endl;
    while (!cin.eof()) 
    {
        cin >> word;
        if (!cin.eof()) 
        {
            toLowerCase(word);
            clean(word);
            //Check the table stopList to make sure the word is not there before applying the Porter
            //transformation and adding it to the the indexing hash table.
            if (!stopList.access(wordc, word))
            {
                stripAffixes(word);
                increment(indexing, word);
            }
        }
    }
    cout << endl;
}
/****************************** indexWords *********************************************************
Action:         Reads a word at a time from the console, verifies that it's not in the stopList, and
                if it's not, it applies the Porter transform to it, then it indexes it in the table
                indexing.

Parameters:
IN:             HashTable &stopList, holds a reference to the stopList table, which contains a list
                of words that will not be added to the indexing table.
OUT:            HashTable &indexing, holds a reference to the main table used to index any entered
                words.

Returns:        Nothing

Precondition:   None
***************************************************************************************************/
indexWords
Action:         Reads a word at a time from the console, verifies that it's not in the stopList, and
if it's not, it applies the Porter transform to it, then it indexes it in the table
indexing.

HashTable &stopList, holds a reference to the stopList table, which contains a list
of words that will not be added to the indexing table.
OUT:            HashTable &indexing, holds a reference to the main table used to index any entered
words.

Nothing

None
indexWords Action : Reads a word at a time from the console verifies that it ' s not in the stopList and if it ' s not it applies the Porter transform to it then it indexes it in the table indexing . HashTable &stopList holds a reference to the stopList table which contains a list of words that will not be added to the indexing table . OUT : HashTable &indexing holds a reference to the main table used to index any entered words . Nothing None
void indexWords(HashTable &stopList, HashTable &indexing)
{
    char word[KEYWORDSIZE];
    WordCounter wordc;
    cout << "Enter words separated by spaces or new lines.\n"
         << "The program will output the Porter transform of the words.\n"
         << "End the input with Ctrl-D." << endl;
    while (!cin.eof()) 
    {
        cin >> word;
        if (!cin.eof()) 
        {
            toLowerCase(word);
            clean(word);
            if (!stopList.access(wordc, word))
            {
                stripAffixes(word);
                increment(indexing, word);
            }
        }
    }
    cout << endl;
}
void indexWords ( HashTable & stopList , HashTable & indexing ) { char word [ KEYWORDSIZE ] ; WordCounter wordc ; cout << " \n " << " \n " << " " << endl ; while ( ! cin . eof ( ) ) { cin >> word ; if ( ! cin . eof ( ) ) { toLowerCase ( word ) ; clean ( word ) ; if ( ! stopList . access ( wordc , word ) ) { stripAffixes ( word ) ; increment ( indexing , word ) ; } } } cout << endl ; }
indexWords
Action:         Reads a word at a time from the console, verifies that it's not in the stopList, and
if it's not, it applies the Porter transform to it, then it indexes it in the table
indexing.
indexWords Action : Reads a word at a time from the console verifies that it ' s not in the stopList and if it ' s not it applies the Porter transform to it then it indexes it in the table indexing .
//Check the table stopList to make sure the word is not there before applying the Porter //transformation and adding it to the the indexing hash table.