The library documents itself · NLP & linguistics
stzListOfTexts
5 own methods · 4 forms written with extensions, listed under their method · Also inherits from stzStringList (91)
the source: base/linguistic/stzListOfTexts.ring(opens in a new tab) · All classes · The area reference: NLP & linguistics
Under each method, its extensions (Q CS XT Z ZZ IB W U): bold and ticked, it exists; struck, it does not. The extensions and what they mean
Examples: 0 come from the library's tests; 3 were composed from each method's signature and run for this page, on a fresh object, for example o1 = new stzListOfTexts([ "a", "b" ]). 2 methods have none yet. Examples run on 2026-10-03 12:54 inside the library at commit 0e72e2e2c.
Method
Explanation, as the source carries it
MostSimilarByMeaning
These are what make a list of TEXTS more than a list of strings. They read the MEANING of each fragment (semantic similarity, sentiment), so a fluent chain like Q(text).SentencesQ().MostSimilarByMeaning(query) / .ThatAre( :Positive) works. Semantic ops upgrade to neural embeddings when a model is loaded (StzNeuralModelQ(path)), else degrade to lexical -- see StzSemanticSimilarity(). The text most similar to pcQuery by MEANING. Uses the loaded neural model's sentence embeddings when one is present, else lexical WORD-OVERLAP cosine -- the right notion for sentences/documents. (The inherited MostSimilarTo() uses Jaro-Winkler CHARACTER similarity, better for fuzzy word/typo matching.)QCSXTZZZIBWU
composed example
o1 = new stzListOfTexts([ "a", "b" ])
? o1.MostSimilarByMeaning("a")
#--> acomposed from the signature, run for this pageThatAre
The texts whose sentiment label matches "positive"/"negative"/"neutral".QCSXTZZZIBWU
Rank these texts (candidate documents) by relevance to a query. Uses a CROSS-ENCODER (joint query+doc scoring) when a reranker GGUF is loaded (StzUseNeuralModel with e.g. jina-reranker), else bi-encoder/lexical similarity. The accurate second stage of retrieve-then-rerank. RankedForQuery(query) -- [[doc, score], ...] sorted by descending relevance. 1 examples runQCSXTZZZIBWUQQ
composed example
o1 = new stzListOfTexts([ "a", "b" ])
? @@( o1.RankedForQuery("a") )
#--> [ [ "a", 1 ], [ "b", 0 ] ]composed from the signature, run for this pageThe single most relevant text to the query (DATA, a string). 1 examples runno extension
composed example
o1 = new stzListOfTexts([ "a", "b" ])
? o1.MostRelevantTo("a")
#--> acomposed from the signature, run for this pageCopy
A copy stays a list of TEXTS (override the base, which returns stzStringList).no extension

