/************************************************************* File: main.cc Description: A test program for the Porter transformation. It reads one word at a time from the console and outputs the transformed word until the input ends by an eof - a CTRL-D under a Linux terminal or the end of the file in case or redirection. Author: Dana Vrajitoru Organization: IUSB Date: October 5, 2004 ***************************************************************/ #include using namespace std; #include "porter.h" int main() { char word[KEYWORDSIZE]; 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()) { strip_affixes(word); cout << word << ' '; } } cout << endl; return 0; }