Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

User-entered relations #4

Open
davidlesieur opened this issue Sep 18, 2020 · 3 comments
Open

User-entered relations #4

davidlesieur opened this issue Sep 18, 2020 · 3 comments
Labels
enhancement New feature or request

Comments

@davidlesieur
Copy link
Member

davidlesieur commented Sep 18, 2020

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 davidlesieur added the enhancement New feature or request label Sep 18, 2020
@davidlesieur
Copy link
Member Author

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 davidlesieur changed the title Manual relations Play nice with Related posts Dec 31, 2024
@davidlesieur
Copy link
Member Author

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 davidlesieur changed the title Play nice with Related posts User-entered relations Dec 31, 2024
@davidlesieur
Copy link
Member Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant