Skip to content

pieroit/dropout-plugin

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

dropout-plugin

Simple recommendation plugin for WordPress. Used as toy example for a talk about Machine Learning in WordPress

How does it work?

The plugin computes similarity between two texts via Jaccard/Tanimoto coefficient.

Tanimoto

Similarities are stored in wp_postmeta for each post; as a result WP stores a similarity graph that can be queried quickly to output recommendations (which is, the most similar posts to the one currently in page).

Two hooks are used:

  • save_post: when a post is saved, it gets compared to the latest posts and results are saved (for each post) in wp_postmeta as an array.
  • the_content: when a post is showed in page, the recommended posts are extracted from the array in wp_postmeta.

About

Simple recommendation plugin for WordPress

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages