Home > Support > Resource Center > askSam 4 Documentation > Chapt9: COUNT WORD OR PHRASE Command

First Document Previous Document Next Document Last Document Search Help

     Chapter 9     

     Sorting and Simple Outputting     


     askSam Concepts in this Chapter:

     Sorting Information

     Outputting a Field

     Using the Show Command

     Totaling a Field

     Counting Words or Phrases




Arranging and Outputting Your Information

There are many ways to Sort and Output lists in askSam. The Report Writer provides the most comprehensive methods, but the commands in the ACTIONS menu give you the basics.


Sorting Information

askSam can Sort Documents alphabetically, numerically, or by date.


To Sort Documents in a File:

1.     Choose ACTIONS -> SORT.

The Sort Dialog Box will appear.


2.     Select the name of the field to use for the sort.

3.     Select the Field Type. You can choose from:

SORT TYPE     DESCRIPTION


TEXT     Sorts in alphanumeric order.


DATE     Sorts by date


NUMERIC     Sorts numerically



4.     Select additional modifiers for the sort. The modifiers are:

MODIFIER     DESCRIPTION


ORDER     Determines whether to sort in ascending or descending order.


SORT ON     Determines whether to sort on: the entire field, last word in field, first      word in field, first word in the Document, or the first line of the      Document.


IGNORE CASE     When set to YES, sort ignores case.


IGNORE ARTICLES     When set to YES, sort ignores the articles “A”, “An”, and “The”.


5.     Repeat steps 2, 3, and 4 for each field you want included in the Sort List.

6.     Choose OK to sort.

The Search Results Window will open in the bottom part of the screen. The Documents in the file will be listed in the Search Results Window in the order specified in the Sort command.

NOTES:

1.     The Sort Command does not change the physical order of the Documents in your file. They are just displayed in sorted order on the screen. (To change the physical order, see Saving A File In Sorted Order later in this chapter.)

2.     Dates of varying formats can be mixed in a file and will still be understood. For example, askSam can compare, sort and evaluate a file with dates such as July 30th, 2000, 30 JUL. 2000, Sun, 30 Jul 2000, and 07-30-2000 mixed throughout the file.

3.     If field names do not appear in the Field List, check two things:

     ·  An Entry Form must be defined containing the field names.

     ·  The Field Character setting in the FILE -> PROPERTIES Dialog Box must contain the proper

Field Character.4. askSam can properly sort dates from multiple centuries.

4.     The “Last Word in Field” setting in the SORT ON column is useful when you have a name field containing first and last name (for example: Name[ Vincent Verges). If you are entering names with suffixes (such as Jr., M.D., or Ph.D.), press CTRL+SPACE to insert a hard blank between the name and the suffix. This prevents the field from sorting on the suffix. CTRL+SPACE inserts a blank, non-printing character into the Document.


Saving A File In Sorted Order

To actually save the Documents in a file in sorted order, use the EXPORT Command to save a copy of the file.


To Save a Sorted Copy of a File:

1.     Choose FILE -> EXPORT.

The export sub-menu will be displayed.

2.     Choose SELECT DOCUMENTS.

The Search Dialog will appear.

3.     Choose CLEAR ALL to clear any selection criteria from the Search List.

4.     Choose the SORT button.

The Sort Dialog Box will appear.

5.     Enter your sort (as described earlier in this chapter).

6.     Choose OK.

You will return to the Search Dialog Box.

7.     Choose OK.

The Export dialog box appears.

8.     Enter a name for the sorted file.

9.     Choose the askSam 4 (*.ask) format in the File Type field.

10.     Choose SAVE.

The file will be sorted and exported to the file name that you entered. When the export is complete, you can open the new file as a normal askSam file.

NOTE: When you export a Document in askSam (.ASK) format, the Entry Forms, reports, and file settings from the original file are transferred to the new file.


Outputting the Contents of a Field

askSam allows you to quickly output the contents of any field contained within a file:

1.     Choose ACTIONS -> FIELD -> OUTPUT.

The Output Field Dialog Box will appear.


2.     Enter the name of a field (or select it from the field list). If the field is longer than a single line, check the “Long Field” option.

3.     Choose OK.

askSam will open a new window containing the contents of the field you selected. If you double click on any line in this list, you return to the Document containing the information in that line. You can print, edit, and save this list as a normal askSam file.

NOTES:

1.     You can also output the contents of a field by typing the field name in the Search Line and pressing ENTER.

2.     For more sophisticated output capabilities, such as sorting lists, or outputting multiple fields, see the chapter on the askSam Report Writer or the description of Customizing the Search Results Window in the chapter on Searching.


Outputting with the SHOW Command

The SHOW command enables you to output using the natural elements contained within blocks of text.  With the SHOW Command, it is possible to output sentences, lines, or paragraphs which contain specific words or phrases. For example, you could search through the complete testimony of the Iran-Contra hearings for every line containing the phrase "Oliver North".


1.     Choose ACTIONS -> SHOW.

The Show Dialog Box will appear.


2.     Enter the word or phrase you wish to locate.

askSam uses this word or phrase to locate specific elements to output for each Document.

3.     Enter a number in the quantity field.

This number determines how many words, sentences, lines, or paragraphs will be output.

4.     Choose Words, Sentences, Lines or Paragraphs for the Structure.

5.     Choose a Direction.

The choices are: Before, After, On Either Side Of, or Containing. This selection defines how much text will be output.

     ·  If you select CONTAINING, only the sentence, line, or paragraph containing the specified word or phrase will be output.

6.     Set the following options:

OPTION

DESCRIPTION


TYPE OF SHOW     Defines what will be output in the show command. “Word or Phrase”      outputs the sentence, line, or paragraph containing the word or phrase      you enter.


     The “First Structure” outputs the first word, sentence, line, or      paragraph from Documents containing the word or phrase you enter.


OUTPUT ALL      Outputs all occurrences of the word or phrase in a Document, or OCCURRENCES     outputs only the first occurrence of the word or phrase in a Document.


RETAIN LINE BREAKS     Retains the line breaks from the original Document, or re-wraps the text      when it's output.


7.     Choose OK.

askSam will output the information to a new window. If you double click on any line in this window, you return to the Document containing the information in that line. You can print, edit, and save this list as another askSam file.

Example

To search your information and output all paragraphs containing the phrase "illegal search":

1.     Choose ACTIONS -> SHOW.

2.     Enter: illegal search.

3.     Choose the option “Paragraphs” and the option “Containing word or phrase”.

4.     Choose OK.

Paragraphs containing the phrase "illegal search" are output to a new window.

NOTE: 

1.     You can define how the information output by the SHOW command is separated. The “Search Line Output Separator” option in the FILE -> PROPERTIES menu defines how information from different

Documents is separated.

2.     The Show command is also available in the Report Writer. See the chapter on Reports for further iformation.

3.     The Output Hit option in the Proximity Search dialog also allows you to output information based on the results of a search. See Proximity Search in the chapter on Searching for details


Using the TOTAL FIELD Command

askSam can quickly determine the sum of a field.


To Total Values In A Field:

1.     Choose ACTIONS -> FIELD -> TOTAL.

The Total Dialog Box will appear.


2.     Enter the name of the numeric field.

3.     Set the Total modifiers:

MODIFIER     DESCRIPTION


LIST AMOUNTS     When this modifier is checked, askSam outputs not just the total, but      also lists the numbers from each field used in the total.


FIRST VALUE ONLY     When the specified field occurs several times in a single Document,      askSam uses all the values in the calculation.  With this modifier is      selected, only the first occurrence in each Document is used.


4.     Choose OK.

askSam totals the contents of the specified field throughout the entire file and displays the sum.

NOTE: If a field contains multiple numeric entries, the total command will add together these values and produce a total for that field. For example, a field GRADES[ 80 90 100] would produce a total of 270.

Using the COUNT WORD OR PHRASE Command

The Count Word or Phrase command serves two purposes:

1.     By default askSam counts all the occurrences of a Word or Phrase in an askSam file (even if they occur several times in individual Documents).

2.     askSam can also count the number of Documents that contain a word or phrase in an askSam file.


To Count Words or Phrases

1.     Choose ACTIONS -> COUNT WORD OR PHRASE.

The Count Word Dialog Box will appear.


2.     Enter the word or phrase you wish to count.

3.     Choose either:

“Count All occurrences of word/phrase” or

\'93Count # of Documents with word/phrase”

4.     Choose OK.

askSam counts according to the option you've selected. A new window is open, and the resulting number is displayed.  


Quick Downloads

 

How people use askSam

 

Surf Report Newsletter

Subscribe today to receive our FREE monthly newsletter. The Surf Report includes tips, articles, and information about new releases, upgrades, free utilities, and special promotions. Sign up today!


Read Back Issues »
 

"askSam is an essential part of my software tool chest. I can research and collect data from anywhere and any source. Once it is in askSam I can edit, rearrange, organize, and search the information easily. Then I can present it and make it totally useful for other people via the web or CD. Fantastic!"

-- Valda Hilley, Author, Literary Agent, Teaching Consultant, Pack rat, and President, Convergent Press, Ltd.

 

Seaside Software Inc. DBA askSam Systems, 121 S Jefferson Street, Perry FL 32347
Telephone: 800-800-1997 / 850-584-6590   •   Email: info@askSam.com   •   Support: http://www.askSam.com/central.asp
© Copyright 1985-2012   •   Privacy Statement