Open jkomoros opened 3 years ago
/auto-title-thread
commandguild-1
idf in the test suiteSee also #10 which captures some of the TFIDF stuff
Actually, all of this behavior about expiring old messages from the cache implies I'm making this way too hard. Especially if we're moving to #41 where there's a more long-term backup data store.
IDF rarely changes (especially for large guilds). Instead of keeping it live to generate it on demand, just do a batch process every so often (every day?) where it fetches all messages and calculates the IDF and saves that to disk in a cache, along with a timestamp so it can figure out when loading back up if it needs to regenerate it. And then when asking for a channel's suggested title, live fetch the messages, calculate the TFIDF, and return that.
For example, use TFIDF to pick out diistinctive words to rename a thread distinctively.
There could be a slash command that could be run in the thread to update it.
Threads created by forking (see #34) could also automatically be named with this.
Generating a TFIDF index is hard for the whole corpus. We could use a TFIDF map extractec from https://thecompendium.cards as a default to start from. And use the same stemming.