unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Jean Louis <bugs@gnu.support>
To: Christopher Howard <christopher@librehacker.com>
Cc: Help Gnu Emacs Mailing List <help-gnu-emacs@gnu.org>
Subject: Re: Org tag generator?
Date: Mon, 23 Dec 2024 23:21:36 +0300	[thread overview]
Message-ID: <Z2nGULkpAl9FUiU5@lco2> (raw)
In-Reply-To: <878qs6ia9d.fsf@librehacker.com>

* Christopher Howard <christopher@librehacker.com> [2024-12-23 20:25]:
> Thank you Jean, for the response. I haven't went over your code
> carefully yet, but it seems like there is something missing here
> that I want. I perhaps should have stated this more explicitly. I
> want the generated tags to be based on the software learning how I
> tagged previous nodes, not simply how it thinks those nodes should
> be tagged in general. E.g., ":emacs:integration:" maybe are tags
> that do summarize well the contents of a node for a general
> audience, but if I am likely to tag it as ":emacs_tricks:" then,
> ideally, those are the tags that it should recommend. This would be
> based on the words in other nodes that I have tagged as
> ":emacs_tricks:".

> I have a system in my mind whereby I apply certain tags based on how
> I think about the data or plan to use the data. What I want is for
> the software to learn that system based on how I have applied it to
> previous nodes.

learning:software:tags:system:previously:tagged:nodes:audience:general:emacs:integration:emacs_tricks:data:use

I have just generated above tags by using query:

generate tags based on this text and return single words as tags
separated by colon in single line

and I have used free software model:

mixtral-8x7b-32768, Groq, https://api.groq.com/openai/v1/chat/completions

> Is this what is happening in the code you provided?

About that. 

There are many solutions, though I see it is in running the LLM. I
have small free software model from Alibaba under Apache 2.0 license,
named Qwen, or as file: QwQ-LCoT-3B-Instruct.Q4_K_M.gguf running
locally here on my computer with Nvidia RTX 1050 Ti 4 GB VRAM.

And it can work well when better instructed, though I got result
":sources:integration:"

There is possibility that you make list of your own tags, and then you
supply the list and get it back returned provided it is relevant to
the text.

> What I'm looking for is a way to generate tags based on how I've
> tagged nodes in the past, rather than just how the software thinks a
> node should be tagged in general.

Above are your words, though rewritten.

Yes, I can understand it well. I have 1806 tags and 157971 documents
and people tagged with various tags. Tags represent flexible
INTERSECTION. And INTERSECTION is very important to me, I use it very
often.

For example, I may search for: coffee,price and get those tagged with
coffee and price, Arabica, Robusta, Single Origin, etc. There are many
ways how I use tags.

I think it is better that you make your own function which is related
to your own specific tags. 

You make function in one file and you make data set in the other
file. Or same one.

I used that feature to link my Markdown website pages with specific
important links.

It can work this way.

(defvar my-tags '(
		  ;; following would tag with "emacs" and "editing" if
		  ;; it finds "emacs" or "editing" in the paragraph
		  ("emacs" . '("emacs" "editing"))
		  ;; if it finds emacs and tricks in paragraph it would receive following tags
		  ("tricks" . '("emacs" "tricks"))
		  ("my-other-tag" . '("my word" "next word"))
		  )) ;

That would be very deterministic. You could or should define how to
know that some section should be tagged, and then you define list of
tags, and conditions when such tags should be used.

I think that is good way to go and much simpler.

> For example, even if ":emacs:integration:" might be a good summary
> of a node's content for a general audience, if I'm more likely to
> tag it as ":emacs_tricks:", then that's the tag I'd like the
> software to recommend.

Above words were rewritten.

Yes, I think this approach summarize it well, though I didn't give too
much of clarity.

> This recommendation would be based on the words in other nodes that
> I've tagged as ":emacs_tricks:".

I think that is great idea.

Now I could give some conditions to each tag, as each of my tags can
be also tagged and have its description and properties. For example, I
also have number of tags, let us say:

TAG: toddler                        

I could extract synonyms by using local dictionary:

- tot
- baby
- preschooler
- child

and then relate it to "toddler" and then if any of such word is
mentioned let us say "more than once" in section, it could get a tag.

So I could make a function to verify if any of defined words is
mentioned more than once.

employee

 18     security                       

Similar

 19     encryption                     

I could here add various encryption terms, to relate it to the tag.

 22     graphviz                       

Various related words like dot, etc. graph, could be related to tag
graphviz

 33     surveillance                   

Various tags related could be added here.

 57     relationships                  

And so on.

That is basically more or less manual "machine learning". Once
prepared, the definition then serves to parse your  text and
understand which tags to propose.

I say to propose, as it may need human intervention. But it would be
so much faster.

I am regularly, for decades, doing heavy text processing, from 1999. I
have made directories and specialized search engines before it was
popular on the market, at that time it was quite interesting.

Let me know if you agree on this concept, and then let us make it.

-- 
Jean Louis



  reply	other threads:[~2024-12-23 20:21 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-18 16:39 Org tag generator? Christopher Howard
2024-12-20 12:14 ` Jean Louis
2024-12-23 17:23   ` Christopher Howard
2024-12-23 20:21     ` Jean Louis [this message]
2024-12-24 16:34       ` Christopher Howard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Z2nGULkpAl9FUiU5@lco2 \
    --to=bugs@gnu.support \
    --cc=christopher@librehacker.com \
    --cc=help-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).