similar-posts icon indicating copy to clipboard operation
similar-posts copied to clipboard

User-entered relations

Open davidlesieur opened this issue 5 years ago • 3 comments

Allow users to enter some relations manually if desired, with the similarity algorithm filling the rest (up to some configured number of relations). The Gensim dependency should be made optional for users who need manual relations only.

Consider compatibility with related-posts configurations, to ease an eventual merge of the two plugins.

(These ideas were initially mentioned in #3)

davidlesieur avatar Sep 18 '20 13:09 davidlesieur

I don't think that merging Similar posts with Related posts would be a good idea, because Similar posts has some heavy dependencies that Related posts users might prefer not to have.

However, I'd like some kind of integration where Similar posts would exclude articles that are already linked through Related posts.

Articles could then easily display a consolidated list containing both manually specified related posts (that the author absolutely wants to link at the time of writing), and automatically found similar posts (that might change as new content gets added to the site), without any duplicates. The SIMILAR_POSTS_MAX_COUNT setting could take the related posts into account, perhaps, so that the consolidated list has a predictable length.

I haven't looked at implementation yet, but this, I suppose, would require that the Related posts plugin gets executed before Similar posts. Consequently, users would have to pay attention to the ordering within their PLUGINS setting.

davidlesieur avatar Dec 31 '24 04:12 davidlesieur

Oh well. While writing the above comment, I had somehow forgotten that Related Posts also relates articles through tags and categories, not just through article slugs specified by the user. That is where Similar Posts and Related Posts overlap.

I believe this leaves two options:

  1. Add support for user-entered relations directly in Similar Posts.

or

  1. Add a setting to Related Posts telling it to use just the user-entered relations. Then have Similar Posts take the article.related_posts variable into account to prevent duplicate links and to determine how many similar posts are needed to reach SIMILAR_POSTS_MAX_COUNT.

Option 1 is simple to implement but duplicates what Related Posts does with its related_posts: metadata.

Option 2 requires two plugins instead of one, and relies on proper plugin execution order. More responsibility on the shoulders of the user.

I'm currently leaning towards option 1.

davidlesieur avatar Dec 31 '24 16:12 davidlesieur

There's another option.

Option 3 would be merging two plugins, supporting all features from both, but making the Gensim dependency optional for those who are content with the simpler algorithms. This idea had been mentioned by @kdeldycke in #3.

I wonder what is simpler for the user: a choice between two similar plugins, each with a well documented approach, or a single plugin that combines the two but that might be a little bit harder to configure.

davidlesieur avatar Dec 31 '24 16:12 davidlesieur