From 73f8c92214bd7afdb0e465dec053272130b53bb5 Mon Sep 17 00:00:00 2001 From: Adam Dickmeiss Date: Thu, 19 Jun 2003 23:05:29 +0000 Subject: [PATCH] More on CCL profiles --- doc/tools.xml | 288 +++++++++++++++++++++++++++++++++++++++++++++------------ 1 file changed, 231 insertions(+), 57 deletions(-) diff --git a/doc/tools.xml b/doc/tools.xml index 3809efa..450b3fc 100644 --- a/doc/tools.xml +++ b/doc/tools.xml @@ -1,4 +1,4 @@ - + Supporting Tools @@ -394,13 +394,13 @@ - Common Command Language + CCL Not all users enjoy typing in prefix query structures and numerical attribute values, even in a minimalistic test client. In the library - world, the more intuitive Common Command Language (or ISO 8777) has - enjoyed some popularity - especially before the widespread + world, the more intuitive Common Command Language - CCL (ISO 8777) + has enjoyed some popularity - especially before the widespread availability of graphical interfaces. It is still useful in applications where you for some reason or other need to provide a symbolic language for expressing boolean query structures. @@ -510,73 +510,247 @@ suggest a few short-hand notations. You can customize the CCL parser to support a particular set of qualifiers to reflect the current target profile. Traditionally, a qualifier would map to a particular - use-attribute within the BIB-1 attribute set. However, you could also - define qualifiers that would set, for example, the - structure-attribute. + use-attribute within the BIB-1 attribute set. It is also + possible to set other attributes, such as the structure + attribute. A CCL profile is a set of predefined CCL qualifiers that may be - read from a file. + read from a file or set in the CCL API. The YAZ client reads its CCL qualifiers from a file named - default.bib. Each line in the file has the form: + default.bib. There are four types of + lines in a CCL profile: qualifier specification, + qualifier alias, comments and directives. - - - qualifier-name - [attributeset,]type=val - [attributeset,]type=val ... - - - - where qualifier-name is the name of the - qualifier to be used (eg. ti), - type is attribute type in the attribute - set (Bib-1 is used if no attribute set is given) and - val is attribute value. - The type can be specified as an - integer or as it be specified either as a single-letter: - u for use, - r for relation,p for position, - s for structure,t for truncation - or c for completeness. - The attributes for the special qualifier name term - are used when no CCL qualifier is given in a query. - - - CCL profile + Qualifier specification - Consider the following definition: + A qualifier specification is of the form: + + + + qualifier-name + [attributeset,]type=val + [attributeset,]type=val ... - - ti u=4 s=1 - au u=1 s=1 - term s=105 - ranked r=102 - - Three qualifiers are defined, ti, - au and ranked. - ti and au both set - structure attribute to phrase (s=1). - ti - sets the use-attribute to 4. au sets the - use-attribute to 1. - When no qualifiers are used in the query the structure-attribute is - set to free-form-text (105). + where qualifier-name is the name of the + qualifier to be used (eg. ti), + type is attribute type in the attribute + set (Bib-1 is used if no attribute set is given) and + val is attribute value. + The type can be specified as an + integer or as it be specified either as a single-letter: + u for use, + r for relation,p for position, + s for structure,t for truncation + or c for completeness. + The attributes for the special qualifier name term + are used when no CCL qualifier is given in a query. - You can combine attributes. To Search for "ranked title" you - can do + The attribute value val may be + specified as in integer. It is also possible to specify + non-numeric values, however, which are used in combination with + certain types. The special combinations are: + + s=pw + + The structure is set to either word or phrase depending + on the number of tokens in a term (phrase-word). + + + + + s=al + + Each token in the term is ANDed. (and-list). + This does not set the structure at all. + + + + + s=ol + + Each token in the term is ORed. (or-list). + This does not set the structure at all. + + + + + r=o + + Allows operators greather-than, less-than, ... equals and + sets relation attribute accordingly (relation ordered). + + + + + t=l + + Allows term to be left-truncated. + If term is of the form ?x, the resulting + Type-1 term is x and truncation is left. + + + + + t=r + + Allows term to be right-truncated. + If term is of the form x?, the resulting + Type-1 term is x and truncation is right. + + + + + t=n + + If term is does not include ?, the + truncation attribute is set to none (100). + + + + + t=b + + Allows term to be both left&right truncated. + If term is of the form ?x?, the + resulting term is x and trunctation is + set to both left&right. + + + + + + + CCL profile + + Consider the following definition: + + - ti,ranked=knuth computer - - which will use "relation is ranked", "use is title", "structure is - phrase". + ti u=4 s=1 + au u=1 s=1 + term s=105 + ranked r=102 + + + Three qualifiers are defined, ti, + au and ranked. + ti and au both set + structure attribute to phrase (s=1). + ti + sets the use-attribute to 4. au sets the + use-attribute to 1. + When no qualifiers are used in the query the structure-attribute is + set to free-form-text (105). - - + + You can combine attributes. To Search for "ranked title" you + can do + + ti,ranked=knuth computer + + which will use "relation is ranked", "use is title", "structure is + phrase". + + + + Qualifier alias + + A qualifier alias is of the form: + + + q + q1 q2 .. + + + which declares q to + be an alias for q1, + q2... such that the CCL + query q=x is equivalent to + q1=x or w2=x or .... + + + + Comments + + Lines with white space or lines that begin with + character # are treated as comments. + + + + Directives + + Directive specifications takes the form + + @directive value + + CCL directives + + + + + + + Name + Description + Default + + + + + truncation + Truncation character + ? + + + field + Specifies how multiple fields are to be + combined. There are two modes: or: + multiple qualifier fields are ORed, + merge: attributes for the qualifier + fields are merged and assigned to one term. + + merge + + + case + Specificies if CCL operatores and qualifiers should be + compared with case sensitivity or not. Specify 0 for + case sensitive; 1 for case insensitive. + 0 + + + + and + Specifies token for CCL operator AND. + and + + + + or + Specifies token for CCL operator OR. + or + + + + not + Specifies token for CCL operator NOT. + not + + + + set + Specifies token for CCL operator SET. + set + + + +
+
CCL API -- 1.7.10.4