- explicit TextCollectionBuilder(unsigned samplerate = TEXTCOLLECTION_DEFAULT_SAMPLERATE,
- ulong estimatedInputLength = TEXTCOLLECTION_DEFAULT_INPUT_LENGTH);
- ~TextCollectionBuilder();
+ // Index type defaults to FM-index.
+ // SWCSA can be used for natural language inputs.
+ // NB: Current SWCSA uses a lot of memory during construction!
+ enum index_type_t { index_type_default, index_type_swcsa, index_type_rlcsa };
+
+ static TextCollectionBuilder* create(unsigned samplerate = TEXTCOLLECTION_DEFAULT_SAMPLERATE,
+ index_type_t type = index_type_default,
+ ulong estimatedInputLength = TEXTCOLLECTION_DEFAULT_INPUT_LENGTH);
+
+
+ virtual ~TextCollectionBuilder() { };