Lotus Software logo
IBM Lotus Domino Designer 8.5
  Versions 8.5 and 8.5.1






@Abstract

Abbreviates the contents of one or more fields by:

Note This function removes all carriage returns and linefeeds, regardless of which keywords are selected.

This function only works with single-byte character sets.

Syntax

@Abstract( [ keywords ] ; size ; beginText ; bodyFields )

Parameters

[ keywords ]

Any number of keywords that tell Lotus Notes/Domino how you want to abbreviate and sort the text (see list below). Keywords are executed in the order in which you list them. Enclose each keyword in brackets and separate multiple commands with colons: [DROPVOWELS]:[NOTRIMWHITE]:[ABBREV].

size

Number. The maximum size of the abstracted text. Can be no larger than 64,994 bytes. The number of bytes available for the abstracted text is size - 1; one byte is reserved for internal use.

beginText

Text. A comment to insert at the beginning of the returned text, no larger than 10 characters. The size of beginText counts toward the total size of the abstracted text, but its contents are unaffected by @Abstract commands. Specify an empty string ("") if you do not want a comment.

bodyFields

Text or text list. Any number of fields containing the text to abstract. May be text, rich text, or keyword fields. The text within each field is concatenated with spaces in the order specified. If Notes/Domino cannot locate a field by name, it uses the string literal instead. Enclose each field name in quotes and separate multiple names with colons: "Sales":"Figures".

Caution Rich text fields are not part of a document until saved. If you want @Abstract to work on additions and changes to the current document, you must first save and then recalculate the document. @Abstract cannot convert rich text to text in a view column.

Return value

abstractedText

Text. The text contained in each of the body fields, abbreviated and sorted as specified by the commands.

Keywords

You can use the following keywords with @Abstract:

[TEXTONLY]

Removes mail headers and punctuation chunks from the text.

[COUNTWORDS]

Computes the significance of each word in the text. A word's significance depends on the number of times it appears in the text. A word that appears in the Significant Word file (see "Files," below) gets its significance boosted. A word that appears in the Insignificant Word file (see "Files," below) has no significance.

[SAVE]

Saves the text in its current state. Saved text can be restored with the [RESTORE] keyword.

[RESTORE]

Discards the current text and restores the last-saved text. You can only restore saved text one time. If no text has been previously saved, this keyword has no effect.

[TRYFIT]

Takes the current text and determines if it has become small enough to fit in the specified size. If so, @Abstract returns the current text, with the modifications applied to this point, and stops, ignoring any remaining commands. If not, @Abstract continues with the next keyword.

[SORTCHUNKS]

Sorts the text according to significance. The text is divided into chunks, of which there are three types: text, mail header, and punctuation.

The significance of a chunk depends upon the significances of the words within it, the number of words in the chunk, and the type and position of the chunk. To use [SORTCHUNKS], you must also use [COUNTWORDS].

[ABBREV]

Abbreviates the text. @Abstract uses an Abbreviation Dictionary to substitute abbreviations for words in the text (see "Files," below). You can control other aspects of the abbreviation process with the following commands (which have no effect unless followed by the [ABBREV] keyword):

[USEDICT]

Specifies that the Abbreviation Dictionary should be used. This is the default.

[NODICT]

Specifies that the Abbreviation Dictionary should not be used.

[KEEPVOWELS]

Keeps vowels in words. This is the default.

[DROPVOWELS]

Removes vowels from words. The first vowel in a word that begins with a vowel isn't affected. If you use [DROPVOWELS], you can optionally use one of the following subcommands.

[DROPFIRSTVOWEL]

Drops vowels from the beginning of words.

[KEEPFIRSTVOWEL]

Keeps vowels at the beginning of words. This is the default.

[TRIMWHITE]

Removes extra white space characters from the text. This is the default.

[NOTRIMWHITE]

Retains extra white space characters in the text.

[TRIMPUNCT]

Removes extra white space characters surrounding punctuation.

[NOTRIMPUNCT]

Retains extra white space characters surrounding punctuation.

[NOSTOPLIST]

Disables the insignificant word list (notestop.txt)

[NOSIGLIST]

Disables the significant word list (notesigl.txt).

Rules

There are three built-in programs you can use with @Abstract.

[RULE1] consists of the following commands, executed in this order:

[TEXTONLY]:[TRYFIT]

Removes all mail header and punctuation chunks. If the text fits, the function is done; otherwise, continues.

[TRIMPUNCT]:

Trims white space around punctuation marks.

[SAVE]:

Saves the current state of the text.

[ABBREV]:[TRYFIT]:

Abbreviates the text. If the text fits, the function is done; otherwise, continues.

[RESTORE]:

Restores the state of the text to what it was prior to abbreviating.

[SAVE]:

Saves the current state of the text.

[DROPVOWELS]:[ABBREV]:[TRYFIT]:

Abbreviates text by dropping vowels. If the text fits, the function is done; otherwise, continues.

[RESTORE]:

Restores the state of the text to what it was prior to abbreviating.

[COUNTWORDS]:[SORTCHUNKS]:[ABBREV]

Counts words and sorts the chunks. Abbreviates the text and returns it.

If the removal of mail headers and punctuation allowed the text to fit into the desired size, then text is returned as is. If the first abbreviation was enough to make the text fit, the returned text begins with a minus character ( - ). If the second abbreviation was enough to make the text fit, the returned text begins with a plus character ( + ). If the function counted the words and sorted the chunks, the text will start with an asterisk ( * ) and the sentences will be separated with a ( | ) to indicate that they were rearranged.

[RULE2] issues the following commands:

[TRIMPUNCT]:[ABBREV]

[RULE3] issues the following commands:

[TEXTONLY]:[TRYFIT]:

Removes all mail header and punctuation chunks. If the text fits, the function is done; otherwise, continue.

[TRIMPUNCT]:

Trims white space around punctuation marks.

[SAVE]:

Saves the current state of the text.

[ABBREV]:[TRYFIT]:

Abbreviates the text. If the text fits, the function is done; otherwise, continue.

[RESTORE]:

Restores the state of the text to what it was prior to abbreviating.

[DROPVOWELS]:

Abbreviates text by dropping vowels.

[SAVE]:

Saves the current state of the text.

[ABBREV]:[TRYFIT]:

If the text fits, the function is done; otherwise, continue.

[RESTORE]:

Restores the state of the text to what it was prior to abbreviating.

[COUNTWORDS]:[SORTCHUNKS]:[ABBREV]

Counts words and sorts the chunks. Abbreviates the text and returns it.

If the function counted the words and sorted the chunks, the returned text begins with an asterisk ( * ) and the sentences are separated with a ( | ) to indicate that they were rearranged.

Files

The following files are used by @Abstract. You can create all, some, or none of these text files, depending on how you want to use @Abstract. Any files you do create must be named as specified below and be present in your Notes/Data file path when you start running the software.

Abbreviation Dictionary (noteabbr.txt)

Each line of the file should contain two words: the first is the original word and the second is its abbreviation. An abbreviation must be shorter than the word it replaces. For example:

telephone ph
number no

Capitalization works as follows:

The abbreviation is never converted to lowercase, but it may be converted to uppercase.

Specified abbreviation

Word being replaced

Resulting abbreviation

Reasoning

Phone

telephone

Phone

The original word appears in lowercase, so the specified abbreviation's case is used.

Phone

TElephone

PHONE

The abbreviation's case is based upon the original word's case.

Phone

Telephone

Phone

The abbreviation's case is based upon the original word's case.

PHONE

Telephone

PHONE

The abbreviation is specified as uppercase, so it always appears as uppercase.

Phone

tElephone

PHONE

The first letter of the abbreviation was already uppercase, so Notes/Domino leaves it alone. The remaining letters of the abbreviation are converted to uppercase to match the second letter of the original word.

Significant Words (notesigl.txt)

The file should be a free-form list of significant words, such as "urgent" or "immediately." When @Abstract computes the significance of text, it boosts the significance of any words included in the significant word list. For example:

client
boss
chocolate

Insignificant Words (notestop.txt)

The file should be a free-form list of words that are always insignificant, such as "the," "and," and "of." When @Abstract computes the significance of words, it ignores any words included in this file. For example:

the
and
of

Mail Headers (notehead.txt)

The file should be a free-form list of words that indicate mail headers, such as Subject, From, and To. In order for @Abstract to consider a chunk a mail header, it must begin with one of the words specified in this file and be followed immediately by a colon and a space. If you want a mail header to be considered significant, place an asterisk after the word. For example:

Subject*
From

Language cross-reference

Abstract method in LotusScript NotesItem class

abstractText method in Java Item class

GetFormattedText method in LotusScript NotesRichTextItem class

getFormattedText method in Java RichTextItem class

See examples

Examples: @Abstract
Related topics
Rich text fields
@AbstractSimple




Library | Support | Terms of use |

Last updated: Monday, October 5, 2009