Ex Libris Universal Gateway –
Transformation Routines
(preliminary overview)
#############################################################
#Term transformation
#############################################################
This file includes exact definitions of term transformations:
*******************************************************
*Transformation: 1
*Parameters: none
*Purpose: delete subfield's signs from the term
*******************************************************
*******************************************************
*Transformation: 2
*Parameters: special chars
*Purpose: replace all special chars (occurred in Parameters) by spaces
*Example: term before transformation: (aaa, bbb-ccc)
* parameters: (-,)
* term after transformation = (aaa bbb ccc)
*******************************************************
*******************************************************
*Transformation: 3
*Parameters: none
*Purpose: insert logical 'AND' between each two non logical words
* ( logical words are - 'and', 'or', 'andnot')
*Example: term before transformation: (aaa or bbb ccc)
* term after transformation: (aaa or bbb AND ccc)
*Note: the transformation is not case sensitive, so for example,
* if it sees 'or', 'OR', 'oR', 'Or' in the term, it thinks that it's logical 'or'
*******************************************************
*******************************************************
*Transformation: 4
*Parameters: none
*Purpose: delete logical 'and', 'or', 'andnot'
*Example: term before transformation: (aaa and bbb or ccc)
* term after transformation: (aaa bbb ccc)
*Note: the transformation is not case sensitive, so for example,
* if it sees 'or', 'OR', 'oR', 'Or' in the term, it thinks that it's logical 'or'
*******************************************************
*******************************************************
*Transformation: 5
*Parameters: number
*Purpose: delete short words from the term -
* maximal length of word to be deleted is in Parameters
*Example: term before transformation: (aaaaa xxx y bbbb)
* parameters: (3)
* term after transformation: (aaaaa bbbb)
*Note: if the term contains single word it's left unchanged
*******************************************************
*******************************************************
*Transformation: 6
*Parameters: char 'L' or char 'U'
*Purpose: if Parameters is 'U' - put the string to upper case
* if Parameters is 'L' - put the string to lower case
*Example: the term before transformation: (aBcDe oPrs)
* parameters: (U)
* the term after transformation: (ABCDE OPRS)
*******************************************************
*******************************************************
*Transformation: 7
*Parameters: special chars
*Purpose: remove part of the term starting from any special
* char from Parameters
*Example: the term before transformation: (Givat Ram [1999])
* parameters: ([(<)
* the term after transformation: (Givat Ram)
*Note: if the term starts from a special char it's left unchanged
*******************************************************
*******************************************************
*Transformation: 8
*Parameters: number
*Purpose: delete part of the term after a word number x, where x is in Parameters
*Example: the term before transformation: (aa bb cc dd ee)
* parameters: (3)
* the term after transformation: (aa bb cc)
*******************************************************
*******************************************************
*Transformation: 9
*Parameters: empty
*Purpose: leave only first char of the last word of the term;
* leave other words of the term unchanged
* (useful to transform the Author to form understandable by SilverPlatter target)
*Example: the term before transformation (Elliot Thomas)
* the term after transformation(Elliot T)
*Note: do nothing if the term contains single word;
* do nothing it the term contains logical sign 'and', 'or', 'andnot' (not case sensitive)
*******************************************************
*******************************************************
*Transformation: 10
*Parameters: char - 'L' or 'R'
*Purpose: if parameters is 'L' add '?' (truncation) to the left end of the term
* if parameters is 'R' add '?' (truncation) to the right end of the term
*Example: the term before transformation: (Elliot T)
* parameter: 'R'
* the term after transformation: (Elliot T?)
*******************************************************
*******************************************************
*Transformation: 1
*Parameters: string pattern
*Purpose: Delete all words from the term starting from
* string pattern from Parameters
*Example: the term before transformation: (<The> present state of the jews)
* parameters: (<)
* the term after parameters: (present state of the jews)
*Note: if the term contains single word it's left unchanged;
*******************************************************
*******************************************************
*Transformation: 12
*Parameters: empty
*Purpose: Insert coma after first word in the term.
* Useful to transform Author to form understable
* by OE_BRANDEN target
*Example: the term before transformation: (Jackson Michael)
* the term after transformation: (Jackson, Michael)
*Note: if the term contains single word - it's left unchanged
* if the term already contains coma - it's left unchanged
*******************************************************
*******************************************************
*Transformation: 13
*Parameters: start string pattern, 'a', end string pattern
*Purpose: Delete all from the term starting from
* start string pattern from parameters and ending by
* end string pattern from parameters
*Example: the term before transformation: (Linden, R <van den>)
* parameters: (<a>)
* the term after transformation: (Linden, R)
*Note: if the term starts from start string pattern and
* ends by end string pattern it's left unchanged
*******************************************************
*******************************************************
*Transformation: 14
*Parameters: string
*Purpose: Delete from the term words equal to string from parameters
*Example: the term before transformation: (art - literature)
* parameters: (-)
* the term after transformation: (art literature)
*Note: if the term contains single word it's left unchanged
*******************************************************
I
******************************************************
*Transformation:15
* Parameters: string
*Purpose: For each word in the term , if the word ends by
* string pattern from parameters, delete this string pattern from the word
*Example: the term before transformation: (modern art-)
* parameters: (-)
* the term after transformation: (modern art)
*******************************************************
*******************************************************
*Transformation:PROC16
* Parameters:string
*Purpose: add to the end of term string pattern from parameters;
* do nothing if the term is single word
*Example: the term before transformation (Elliot T)
* parameters: (?)
* the term after transformation (Elliot T?)
*******************************************************
*******************************************************
*Transformation:PROC17
*Parameters: empty
*Purpose: If number of words in the term is not equal to 2 – the term left unchanged
* If length of the second word is greater than 2, leave only
* first char of the second word and add '?' to the end of the second word.
* Connect the words by '-'
*
*Example 1: the term before transformation:(Eliot TS)
* the term after transformation: (Elliot-TS)
*Example 2: the term before transformation: (Eliot Thomas)
* the term after transformation: (Eliot-T?)
*******************************************************
*******************************************************
*Transformation:PROC18
*Parameters: string
*Purpose: append to each word of the term (except logical operators ‘and’, ‘or’, ‘andnot’)
* the string from parameters
*
*Example: the term before transformation: (israel AND history)
* parameters: ([TITL])
* the term after transformation: (israel[TITL] AND history[TITL])
*******************************************************
*******************************************************
*Transformation:PROC19
*Parameters: string
*Purpose: append the string from the parameters to the end of the term
*
*Example: the term before transformation: (Smith John)
* parameters: ([AUTH])
* the term after transformation: (Smith John[AUTH])
*******************************************************
*******************************************************
*Transformation:PROC20
*Parameters: empty
*Purpose: remove from the term all words listed in table
* /aleph/a50_5/alephe/utf_files/aleph/a50_5/vir00/tab/tab03
*
*Example: the term before transformation: (History of medicine)
* parameters: contains word ‘of’
* the term after transformation: (History medicine)
*******************************************************
*******************************************************
*Transformation:PROC21
*Parameters: number
*Purpose: cut the term so that it’s length will be no more than number defined in Parameters
* Only complete words are left. If the term is logical expression the result is
* valid logical expression
*
*Example: the term before transformation: (history AND of AND the AND art)
* parameters: (20)
* the term after transformation: (history AND of)
*******************************************************
*******************************************************
*Transformation:PROC22
*Parameters: number1_number2
*Purpose: delete string of characters starting from position number1 in the term
* containing number2 characters, where number1 and number2 are
* defined in Parameters
*
*Example: the term before transformation: ($$axxxhistory AND art)
* Parameters: (4_3)
* the term after transformation: ($aahistory AND art)
*******************************************************
*******************************************************
*Transformation:PROC23
*Parameters: string
*Purpose: if the term contains exactly one word, add the string from parameters
* to the end of the term.
*
*Example: the term before transformation: (gilbert)
* Parameters: (-?)
* the term after transformation: (gilbert)
*******************************************************
*******************************************************
*Transformation:PROC24
*Parameters: string
*Purpose: add the sring from parameters to the beginning of the term
*Example: the term before transformation: (smith john)
* Parameters: ([AUTH])
* the term after transformation: ([AUTH]smith john)
*******************************************************
*******************************************************
*Transformation:PROC25
*Parameters: string
*Purpose: concatenate the words in the term using the string from parameters
* do nothing if:
* - the term contains single word;
* - the term contains logical expression;
*
*Example: the term before transformation: (reed dorothy)
* Parameters: (-)
* the term after transformation: (reed-dorothy)
*******************************************************