Tokenizer

org.llm4s.vectorstore.SQLiteKeywordIndex.Tokenizer
enum Tokenizer(val fts5Name: String)

The FTS5 tokenizer an index splits text with (#3026), fixed when the index is created.

  • Unicode61, the default: words split at spaces and punctuation, case and diacritics folded. A run of unsegmented text (Chinese, Japanese, Thai) is one token, so a word inside it is not found.
  • Trigram: every three-character substring is a token, so a query of three or more characters finds any text that contains it, in any script. A query word shorter than three characters matches nothing, and there is no stemming. The index is about three times the size of the text.

Attributes

Source
SQLiteKeywordIndex.scala
Graph
Supertypes
trait Enum
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Type members

Enum entries

case Trigram extends Tokenizer

Attributes

Source
SQLiteKeywordIndex.scala
case Unicode61 extends Tokenizer

Attributes

Source
SQLiteKeywordIndex.scala