Profiling Engine SDK
API Reference

API
Function List
Topical List
   
 
Query Language
Introduction
Summary
Operators
Tips, Questions, and Answers
   
 
Main Index
Index
Tutorial
API Functions
Query Language
   
Technology Overview
   
Contact Us
   
 
Other Products

Onix Text Search and Retrieval Engine
Brevity Document Summarizer
Lextek Document Profiler & Categorizer
RouteX Document Routing Engine
Lextek Language Identifier
 

prStartZone

Name

prStartZone

Synopsis

void prStartZone(ProfilingEngineT ProfilingEngine, WordTypeT *Zone, StatusCodeT *Status)

Arguments

ProfilingEngine: The profiling object you created with prCreateProfilingEngine.

Zone: Pointer to a word structure of type WordTypeT which contains the name and length of the zone you are starting.

Status: A pointer to a value of type StatusCodeT representing any error conditions.

Returns

Nothing

If an error occurred, Status will be set to the error number.

Description

prStartZone() starts a new named region for the document called a zone. These zones can be specified in the query parser to narrow a search to a specific region of a record rather than across the record as a whole. Thus, for instance, you could find the occurrence of two terms in a given sentence rather than simply in the entire record. Zones function much the way that records do, but allow greater flexibility.

The rules for defining zones is that the names must only consist of alphanumeric and underscore characters. You can not nest a zone within an other zone of the same name. For instance you can't have a paragraph within a paragraph. You have to end the first paragraph before you can start this new paragraph. You can, however nest zones of different names within each other. For instance you may define a paragraph zone and within that zone have multiple sentence zones.

After you have defined zones in a record at index time, the query language will allow you to create new zones from these defined zones. Examples of this might be to expand a given zone by three words on either side or to merge adjacent zones of the same type. Consult the Query Language Manual for more information about functions utilizing zones.

Zones end up being one of the most powerful features of the Profiling Engine as they allow you to give significance to specific parts of your documents. For instance applications analyzing news stories might define a zone called First_Paragraph and give greater weight to terms found within it. (In news the first paragraph often provides a summary of the story) You could also define zones for author information, dates, addresses and so forth. By using operators working on zones you can even define regions based upon the significance of certain hits in a query.

Since a Zone defines a region in the text, it is important that you call prStartZone and prEndZone based upon where you are indexing in the text. The word location is set with prIndexWord and the zone defining functions use that information to determine where your region starts and ends.

 

See Also

prEndZone, prIndexWord, prIndexWordSpecial, prResetProfiler, prResetProfilerQueryParser