Can you say a bit more about which algorithm they're using? I'm a data scientist and I'd be happy to collaborate a bit on this, but my specialties are Python and R so I'd have to write the machine learning backend in one of those languages for you.
If you are using nodebb-plugin-emoji-extended then there is a 'dirty' fix for that.
Navigate to your Emoji plugin folder and open index.js.
Example path: /home/nodebb/node_modules/nodebb-plugin-emoji-extended/index.js.
Once you've opened the file, find a part where it states emojiPath="http://127.0.0.1:4567/plugins/nodebb-plugin-emoji/images/".
Set this to something like this emojiPath="http://forum.domain.com/plugins/nodebb-plugin-emoji-extended/images"
Of course, this will only work if you are running NodeBB with nginx or Apache proxy.