Is there a semantic script/db for emacs which I could use to extend some search functions?
E.g. Search for create with helm-org and get both headings from the example below returned:
* Create foo
* Make foo
Is there a semantic script/db for emacs which I could use to extend some search functions?
E.g. Search for create with helm-org and get both headings from the example below returned:
* Create foo
* Make foo
If you want to test words to see if they are synonyms then one possibility is to use a thesaurus inside Emacs. (Another is to check a thesaurus outside Emacs.)
Library synonyms.el
(code) gives you access to a word base from Roget's thesaurus inside Emacs. You can combine that with "search" or whatever, and look up any pair of words, to see if they're present as synonyms in the thesaurus.
Library synonyms.el
is mainly for exploring the thesaurus interactively. But I've just added function synonyms-p
, which just tests whether a given word is a synonym of another:
(synonyms-p "create" "make") ; Returns non-nil.
(synonyms-p "create" "chicken") ; Returns nil.
This may be overkill for your use case, but there is a recent blog post titled Semantic Search for Org roam that uses OpenAI's text-embedding-ada-002
to compare blocks of text. It works by using machine-learning techniques to transform a given block of text into a point in 1536-dimensional space. Then, given an input, you can search for similar text simply by looking for nearby points in that space.
Luis Moneda's work allows you to search your Org roam files in a very advanced semantic way by:
Note that I have not audited this code. And it may cost (Luis stated it cost him $0.14).