<!doctype HTML public "-//W3C//DTD HTML 4.0 Frameset//EN">

<html>

<!--(==============================================================)-->
<!--(Document created with RoboEditor. )============================-->
<!--(==============================================================)-->

<head>

<title>About the Knowledge Base</title>

<!--(Meta)==========================================================-->

<meta http-equiv=content-type content="text/html; charset=windows-1252">
<meta name=date content="08 27, 2001 4:32:54 PM">
<meta name=generator content="RoboHELP by eHelp Corporation - www.ehelp.com">
<meta name=generator-major-version content=0.1>
<meta name=generator-minor-version content=1>
<meta name=filetype content=kadov>
<meta name=filetype-version content=1>
<meta name=page-count content=1>
<meta name=layout-height content=1114>
<meta name=layout-width content=1027>


<!--(Links)=========================================================-->

<link REL="StyleSheet" HREF="../default.css">



</head>

<!--(Body)==========================================================-->


<body>

<h1>About the Knowledge Base</h1>

<p><span style="font-weight: normal;">The Knowledge Base Management System 
 (KBMS) used in VisualText</span>™<span style="font-weight: normal;"> is 
 based on a knowledge representation framework developed by Text Analysis 
 International, called </span>Conceptual Grammar™ <span style="font-weight: normal;">(CG). 
 CG represents knowledge in terms of concepts, phrases, and their attributes. 
 Everything &quot;hangs&quot; off a hierarchy of concepts. Because CG can 
 represent concepts, phrases, attributes, and their interrelationships, 
 it allows diverse types of knowledge to be stored flexibly within a single 
 framework. See also the <a HREF="../VisualText_Interface/Knowledge_Base.htm">Introduction 
 to the Knowledge Base</a>.</span></p>

<p><span style="font-weight: normal;">The <a HREF="../VisualText_Interface/Tools/KB_Editor.htm">KB 
 Editor</a> and the <a HREF="../VisualText_Interface/Tools/Attribute_Editor.htm">Attribute 
 Editor</a> can be used to manipulate portions of the KB.</span></p>

<h2><a name=location></a>KB Location</h2>

<p><span style="font-weight: normal;">The KB is stored under an application's 
 kb folder. For example, for the tutorials, the folder</span></p>

<p style="margin-left: 40px;
			line-height: normal;
			margin-bottom: 14pt;
			margin-top: 14pt;
			x-text-tab-stops: repeat 1in;
			white-space: nowrap;
			font-size: smaller;
			font-family: monospace;"><span style="font-weight: normal;">C:\apps\myAnalyzerFolder\myAnalyzer\kb</span></p>

<p><span style="font-weight: normal;">has a folder called </span><span 
 style="font-weight: bold;">user</span><span style="font-weight: normal;">. 
 The </span><span style="font-weight: bold;">user</span><span style="font-weight: normal;"> 
 folder stores data specific to the analyzer in question. The KB for an 
 analyzer is defined by the four files in the kb\user folder: </span><span 
 style="font-weight: bold;">attr.kb</span><span style="font-weight: normal;">, 
 </span><span style="font-weight: bold;">hier.kb</span><span style="font-weight: normal;">, 
 </span><span style="font-weight: bold;">phr.kb</span><span style="font-weight: normal;"> 
 and </span><span style="font-weight: bold;">word.kb</span><span style="font-weight: normal;">.</span></p>

<h2><a name=kb_objects></a>KB Objects</h2>

<p>The KB consists of a hierarchy of <span style="font-weight: bold;">concepts</span>. 
 <span style="font-weight: bold;">Attributes</span> can be associated with 
 each concept . An attribute consists of a <span style="font-weight: bold;">key</span> 
 (or <span style="font-weight: bold;">slot</span>, or <span style="font-weight: bold;">name</span>) 
 and zero or more <span style="font-weight: bold;">values</span>. A value 
 can be a string, an integer, or another concept. Each attribute can have 
 multiple values, each with a distinct type. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->(Note 
 that a <span style="font-weight: bold;">value</span>, or <span style="font-weight: bold;">val</span>, 
 is a type of knowledge base object.)</p>

<p>A concept can also have an associated <span style="font-weight: bold;">phrase</span> 
 of <span style="font-weight: bold;">nodes</span>. A node is similar to 
 a concept in most respects, except that a node is not placed directly 
 in the knowledge base hierarchy. Rather, nodes serve as &quot;proxies&quot; 
 or references to concepts that reside in the hierarchy. Phrases can be 
 used to implement idioms, patterns, samples, rules -- in short, any sequential 
 information.</p>

<p><font style="color: #ff0000;"
		color=#FF0000>Advanced Notes:</font> <span style="font-weight: normal;">An 
 attribute key itself is actually a concept, rather than a string, so that 
 multiple attributes with the same &quot;name&quot; can coexist peacefully 
 within the same concept. To add further flexibility (or complexity, depending 
 on your view), multiple attributes with identical keys can reside within 
 a single concept. For many applications, referring to attribute keys by 
 name is just fine, so most of the implemented NLP++ functions that you'll 
 encounter refer to attributes by name.</span></p>

<h2>Knowledg<span style="font-weight: normal;">e Base Functions</span></h2>

<p>See the <a HREF="../Table_of_Knowledge_Base_Functions.htm">Table of 
 KB Functions</a> and page-per-function in the Knowledge Base Functions 
 section.</p>

<h2>Saving the Knowledge Base</h2>

<p>The knowledge base can be changed manually by using the KB Editor. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->Analyzers 
 can also be programmed to update the knowledge base automatically, for 
 example to accumulate information across a set of documents.</p>

<p>Some analyzers are geared to load up a relatively empty knowledge base 
 and then populate it temporarily. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->Some 
 analyzers are built primarily to grow a large knowledge base. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->When 
 exiting VisualText, the user is asked to save the changes to the knowledge 
 base or discard them. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->Unless 
 your purpose is specifically to build or modify a knowledge base, then 
 you can opt not to save the modified knowledge base. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->Some 
 distinctions to be aware of:</p>

<p>Save KB - Saves the knowledge base into command files.<br>
Compile KB - Saves the knowledge base into a file system.<br>
Load interpreted KB - read kb command files into the knowledge base on 
 loading an analyzer.<br>
Load compiled KB - load or use the compiled kb file or file system.</p>

<h2>QDBM-Based Knowledge Base</h2>

<p style="margin-bottom: 0;">With the 2.1.0.0 version and later, VisualTextQ 
 provides a knowledge base manager based on the QDBM freeware. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->This 
 supports growing very large knowledge bases in VisualText, by virtue of 
 replacing the old kb.dll file with the QDBM file system. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->With 
 this variant, loading the interpreted version reads the knowledge base 
 command files into the QDBM database. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->Saving 
 the knowledge base writes out command files, as before. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->Compiling 
 the knowledge base saves off a copy of the QDBM database.</p>

<p style="margin-bottom: 0;">Loading the compiled knowledge base copies 
 the QDBM database to a temporary folder (kb\tmp) for use in the current 
 session. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->If 
 the session is closed without saving the kb, then the changes made in 
 the tmp area are discarded. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->If 
 the kb is &quot;compiled&quot;, then the tmp area is merely copied to 
 the permanent store (kb\qdbm).</p>

<p style="margin-bottom: 0;">In this way, the same knowledge base management 
 commands work as before, but under the hood the QDBM system replaces the 
 kb.dll file for the compiled version of the knowledge base. <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->As 
 always, BEFORE UPGRADING to the new VisualText version, it is important 
 to save any knowledge base that is important -- this will create command 
 files that will automatically load in any newer version of VisualText. 
 <!--kadov_tag{{<spaces>}}-->&nbsp;<!--kadov_tag{{</spaces>}}-->For questions 
 about kb management, please contact our support.</p>

</body>

</html>
