FM Statistics
FMStatistics.fsi
Problem description
The only statistical analysis offered by FrameMaker is counting words or characters in an individual document (‘File > Utilities > Document Reports’).
This is not always sufficient for an approximate estimation of the amount of text to be translated or an overview of objects that may be relevant for translation (and thus the relative translation expenditure). The character count does not include spaces.
Function description
The script counts all objects that are relevant for translation in the current document or all documents of the current book. Optionally, multiple books or documents (.fm) in subfolders may be included in the search. (see Extended book or file selection).
The report lists the number of applicable objects and the total number of characters and words.
You can specify on the basis of which objects the number of characters and words should be calculated (paragraphs, index markers, variables, etc.). Only objects on body pages are included.
The report includes the ‘norm line’ (also known as the ‘standard line’) that is commonly applied in Germany. A standard line is an average line that contains 55 characters including spaces; a norm page has 1760 characters (32 norm lines). In addition, statistical information is listed.
Calculation details
The calculation of the number of characters in variables includes the text that is displayed, not the character formats. ‘<iEmphasis>Frame<default ¶ format>’ results in 5 characters, not 31.
The Word calculation currently only includes words that contain letters. For documents up to FrameMaker 7, virtual fonts and various codepages were taken into account. The word calculation beginning with Framemaker 8 currently only works correctly for western languages (code page 1252).
The calculation of the number of characters currently does not work correctly with Asian (double-byte) languages.
Extended book or file selection
The search may also include all books or documents in the specified start folder instead of the current book or document. Optionally, books or documents in subfolders may be included.
For example, the following books are located below the ‘80541-119’ start folder:
The search should only include the User Guide books that are highlighted in yellow. Books highlighted in cyan should be excluded.
All relative paths (below the start folder) and all names of books are listed on the left side of the filter dialog:
In order to exclude certain folders or books, their name (or a unique part of the name) has to be inserted in the text fields on the right side of the dialog. Upper and lower case spelling is not taken into account.
Click on the ‘Refresh’ button to refresh the displayed list of the folders and books to be searched.
Requirements
- FrameMaker 6.0 or higher
- FrameScript/ElmScript 4.1 or higher
- FMStatistics.dll must be located in the FrameMaker ‘Plugins’ folder. During the installation of [i]-frame using the installation program, this DLL will automatically be copied there.
Notes
The script works with structured and unstructured documents.
The report is saved in the selected start folder (‘_[i]_FM-Statistics.fm’).
The script does not replace the analysis with a translation memory system. The script cannot include repeatedly used texts, fuzzy matches and texts that already exist in the TM.



Klaus Müller![[i]-frame FMStatistics [i]-frame FMStatistics](fileadmin/content/images/Leistungen/FrameScript/i-frame_en/FMStatistics2.png)
![[i]-frame FMStatistics [i]-frame FMStatistics](typo3temp/pics/87ac06c115.png)
![[i]-frame FMStatistics](typo3temp/pics/241846706a.png)
![[i]-frame FMStatistics [i]-frame FMStatistics](fileadmin/content/images/Leistungen/FrameScript/i-frame_en/FMStatistics4.png)
![[i]-frame FMStatistics [i]-frame FMStatistics](fileadmin/content/images/Leistungen/FrameScript/i-frame_en/FMStatistics6.png)
![[i]-frame FMStatistics [i]-frame FMStatistics](fileadmin/content/images/Leistungen/FrameScript/i-frame_en/FMStatistics7.png)
![[i]-frame FMStatistics [i]-frame FMStatistics](typo3temp/pics/1ba1ed292d.png)
![[i]-frame FMStatistics](typo3temp/pics/fe1a02598c.png)
![[i]-frame FMStatistics](fileadmin/content/images/Leistungen/FrameScript/i-frame_en/FMStatistics11.png)