0

sqlite fts4 extension specify for remove diacritics from Latin script characters

tokenize=unicode61 "remove_diacritics=2"

but selected offsets queries return different values ​​when diacritics are in text. I use offsets information to mark matched words in the text, but the Latin diacritics affect the real byte offset of the matching term.

CREATE VIRTUAL TABLE fts_table USING fts4 (text_column, tokenize=unicode61 "remove_diacritics=2" )

INSERT INTO fts_table (text_column) VALUES ('Así volvió de los campos en el principio')
INSERT INTO fts_table (text_column) VALUES ('Asi volvio de los campos en el principio')

SELECT offsets(fts_table), text_column FROM fts_table WHERE text_column MATCH '"en el principio"'

Select Result:

offsets(fts_table)              text_column
0 0 27 2 0 1 30 2 0 2 33 9      Así volvió de los campos en el principio
0 0 25 2 0 1 28 2 0 2 31 9      Asi volvio de los campos en el principio

Any idea what I am doing wrong?

0 Answers0