// This is a simple test of some of the features of the WordNet library. // I'll keep working on it this week (4/11/05), beefing it up as I learn // more about the library. #include #include using namespace std; #include int main( int argc, char *argv[] ) { if( argc != 2 ) { cerr << "Usage: " << argv[0] << " noun" << endl; exit( 1 ); } wninit(); int k; SynsetPtr synsetList = findtheinfo_ds( argv[1], NOUN, SYNS, ALLSENSES ); SynsetPtr currentSynset = synsetList; while( currentSynset != NULL ) { cout << "Count: " << currentSynset->wcount << endl; for( k=0; k < currentSynset->wcount; k++ ) cout << currentSynset->words[k] << endl; currentSynset = currentSynset->nextss; } cout << endl << "----------------------------------------" << endl; cout << findtheinfo( argv[1], NOUN, SYNS, ALLSENSES ) << endl; return 0; }