💡 All-in-one AI framework for semantic search, LLM orchestration and language model workflows
Python agentsaiai-agentsembeddingsinformation-retrievallanguage-modellarge-language-modelsllmnlppythonragretrieval-augmented-generationsearchsearch-enginesemantic-searchsentence-embeddingstransformerstxtaivector-databasevector-search
Update documentation for string tokenizer #61
davidmezzettif9ee1c414aa7
diff --git a/README.md b/README.mdindex aa1360c7..0b090837 100644--- a/README.md+++ b/README.md@@ -124,6 +124,14 @@ path: stringRequired field that sets the path for a vectors model. When method set to _transformers_, this must be a path to a Hugging Face transformers model. Otherwise,it must be a path to a local word embeddings model.+#### tokenize+```yaml+tokenize: boolean+```++Enables string tokenization (defaults to true). This method applies tokenization rules that work best with English language text and help increase the+quality of English language sentence embeddings. This should be disabled when working with non-English text.+#### storevectors```yamlstorevectors: booleandiff --git a/src/python/txtai/tokenizer.py b/src/python/txtai/tokenizer.pyindex 45024c21..ff9a67de 100644--- a/src/python/txtai/tokenizer.py+++ b/src/python/txtai/tokenizer.py@@ -35,5 +35,5 @@ class Tokenizer:# Tokenize on alphanumeric strings.# Require strings to be at least 2 characters long.- # Require at least 1 alpha character in string.+ # Require at least 1 non-trailing alpha character in string.return [token for token in tokens if re.match(r"^\d*[a-z][\-.0-9:_a-z]{1,}$", token) and token not in Tokenizer.STOP_WORDS]