home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
NeXTSTEP 3.0
/
NeXTSTEP3.0.iso
/
NextDeveloper
/
Headers
/
indexing
/
IXWeightingDomain.h
< prev
next >
Wrap
Text File
|
1992-03-22
|
2KB
|
45 lines
/*
IXWeightingDomain.h
Copyright 1991, NeXT Computer, Inc.
*/
#import <objc/Object.h>
@class IXAttributeParser;
@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 WFTable format
- initFromAttributeParser:(IXAttributeParser *)aParser;
- (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;
@end