afs_spellcheck_build - AFS - Reference Guides

AFS Filters Description

Product
AFS
Platform
7.12
Category
Reference Guides
Language
English

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.

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

This filter can be instantiated only once at any given moment. It will not read the "instances" parameter in the configuration.

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

Parameter name

Mandatory

Type

Default

Description

auto

No

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. In auto mode, the Spellcheck will process the documents as follows:

keep_percent

No

integer

100%

Percentage of document kept to build spellcheck database.

do_nothing_if_no_document

No

boolean

false

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

languages

No

list

N/A

List of languages for which to build a spellcheck database, in addition to the language of the documents going through this filter. Doesn't not apply if auto is set to true

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.
Attention: This filter can be instantiated only once at any given moment. It will not read the "instances" parameter in the configuration.
Tip: Note that 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.