classify module¶
Classes and functions for classifying and extracting information from documents.
See the keyword extraction guide for a task-oriented introduction to query expansion and “more like this”.
Expander¶
- class whoosh.classify.Expander(ixreader: Any, fieldname: str, model: type[ExpansionModel] | ExpansionModel = <class 'whoosh.classify.Bo1Model'>)[source]¶
Uses an ExpansionModel to expand the set of query terms based on the top N result documents.
- Parameters:
reader – A :class: whoosh.reading.IndexReader object.
fieldname – The name of the field in which to search.
model – (classify.ExpansionModel) The model to use for expanding the query terms. If you omit this parameter, the expander uses
Bo1Modelby default.