afs_spellcheck_build - AFS

SpellCheck

Product
AFS
AFS_Version
7.10
Category
Technical Notes
language
English
audience
public

The afs_spellcheck_build filter generates SpellChecker databases from PaF execution result.

The filter is declared with the afs_spellcheck_build type. It is in the antidot-paf package. It is a visitor filter.

The Spellcheck Build filter specifications are described in the following table:

Parameter name

Card.

Type

Default

Description

auto

O

boolean

false

Toggle enabling auto_tuning of filter behavior, i.e. when document database is large then update reply databases only when necessary, and not every time.

keep_percent

O

integer

100 %

Percentage of document kept to build spellcheck database.

do_nothing_if_no_document

O

boolean

false

If true, the filter will not build databases if no document has reached this filter during PaF execution.

For all the documents of a given language, a database is generated in $AFS7/spellcheck/$LANG directory.

For documents without any language, a database is generated in $AFS7/spellcheck directory.

For each database, an about.afs file is generated. There is no global about.afs file.

This filter will only work if instanced after an afs_doc_index filter.

This filter cannot be instanced more than once. It will not read the "instances" parameter in the configuration.

This filter processes all documents of the PaF, regardless of any branch generated by a switch. In other words, it is useless to put this filter in a branch.

The spellcheck auto mode works as follows:

Number of documents

Spellchecker activation

Number of documents checked

less than 10,000

every run

checks 100 % of all documents

between 10,000 and 100,000

each 1,000 documents or 100 runs

checks 75 % of all documents

between 100,000 and 1,000,000

each 10,000 documents or 1,000 runs

checks 50 % of all documents

more than 1,000,000

each 100,000 documents or 10,000 runs

checks 10 % of all documents