ftp.nice.ch/pub/next/developer/languages/c/gcc.2.7.2.2.I.b.tar.gz#/lib/gcc-lib/i386-next-nextstep3/2.7.2.2.f.2/include/indexing/IXWeightingDomain.h

This is IXWeightingDomain.h in view mode; [Download] [Up]

/*
IXWeightingDomain.h
Copyright 1991, NeXT Computer, Inc.
*/

#import	<objc/Object.h>
#import	<objc/hashtable.h>

@class IXAttributeParser, IXAttributeTable;

@interface IXWeightingDomain: Object
{
    unsigned	beenRanked; /* true when tokens have been ranked*/
    unsigned	totalTokens; /* the record of tokens in sample*/
    unsigned	uniqueTokens; /* record of unique tokens in sample*/
    unsigned	indexCount; /* record of entries in token index*/
    unsigned	totalLength; /* the sum of all the token lengths*/
    void	*tokenArray; /* "lexeme rank count lexeme rank count..."*/
    unsigned	*tokenIndex; /* array of offsets into token array*/
}

- initFromDomain:(NXStream *)stream; /* reads domain format*/
- writeDomain:(NXStream *)stream; /* write domain format*/

- initFromHistogram:(NXStream *)stream; /* reads histogram format*/
- writeHistogram:(NXStream *)stream; /* writes histogram format*/

- initFromWFTable:(NXStream *)stream; /* reads pre- 3.0 WFTable format*/

/* initializes the weighting domain from an attribute table.*/
- initFromAttributeTable:(IXAttributeTable *)theTable;

/* The following methods initialize the weighting domain from one of the */
/* attributes in the supplied attribute parser.*/

- initFromAttributeParser:(IXAttributeParser *)aParser; /* for "Default"*/
- initFromAttributeParser:(IXAttributeParser *)aParser
    forAttributeNamed:(const char *)name;

- (unsigned)totalTokens; /* how many tokens were seen by parser*/
- (unsigned)uniqueTokens; /* how many unique tokens were found by parser*/

- (unsigned)countForToken:(void *)token /* how many times did token occur*/
    ofLength:(unsigned)aLength;
- (unsigned)rankForToken:(void *)token /* rank token against the others*/
    ofLength:(unsigned)aLength;

- (float)frequencyOfToken:(void *)token /* ratio token count to total count*/
    ofLength:(unsigned)aLength;
- (float)peculiarityOfToken:(void *)token /* frequency relative to domain*/
    ofLength:(unsigned)aLength andFrequency:(float)frequency;

/* The following methods provide for iterating over the tokens in the domain.*/

- (NXHashState)initHashState;
- (BOOL)nextHashState:(NXHashState *)aState 
    value:(const void **)aValue length:(unsigned *)aLength;

@end

These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.